<?php
/**
 * Credorax Payments For WooCommerce
 * https://www.credorax.com/
 *
 * @category Credorax
 * @package  WC_Credorax
 * @author   Girit-Interactive (https://www.girit-tech.com/)
 */

 if (! defined('ABSPATH')) {
     exit; // Exit if accessed directly.
 }
 
/**
 * RedirectException
 */
class WC_Credorax_Model_RedirectException extends \Exception
{
    /**
     * @var string
     */
    protected $redirectUrl;

    /**
     * @param string $redirectUrl
     * @param \Exception $cause
     * @param int $code
     */
    public function __construct($redirectUrl, \Exception $cause = null, $code = 0)
    {
        $this->redirectUrl = $redirectUrl;
        parent::__construct($redirectUrl, (int)$code, $cause);
    }

    /**
     * Get Redirect URL
     *
     * @return string
     */
    public function getRedirectUrl()
    {
        return $this->redirectUrl;
    }
}
