This repository has been archived on 2026-04-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
PayPal-PHP-SDK/lib/PayPal/Api/RedirectUrls.php
2014-05-04 17:01:49 +10:00

137 lines
2.8 KiB
PHP

<?php
namespace PayPal\Api;
use PayPal\Common\PPModel;
use PayPal\Rest\ApiContext;
/**
* Class RedirectUrls
*
* @property string return_url
* @property string cancel_url
*/
class RedirectUrls extends PPModel
{
/**
* Set Return URL
* Url where the payer would be redirected to after approving the payment
*
* @param string $return_url
*
* @return $this
*/
public function setReturnUrl($return_url)
{
if(filter_var($return_url, FILTER_VALIDATE_URL) === false)
{
throw new \InvalidArgumentException("Return URL is not a fully qualified URL");
}
$this->return_url = $return_url;
return $this;
}
/**
* Get Return URL
* Url where the payer would be redirected to after approving the payment
*
* @return string
*/
public function getReturnUrl()
{
return $this->return_url;
}
/**
* Set Return URL
* Url where the payer would be redirected to after approving the payment
*
* @param string $return_url
*
* @deprecated Use setReturnUrl
*
* @return $this
*/
public function setReturn_url($return_url)
{
$this->return_url = $return_url;
return $this;
}
/**
* Get Return URL
* Url where the payer would be redirected to after approving the payment
*
* @deprecated Use getReturnUrl
*
* @return string
*/
public function getReturn_url()
{
return $this->return_url;
}
/**
* Set Cancel URL
* Url where the payer would be redirected to after canceling the payment
*
* @param string $cancel_url
*
* @return $this
*/
public function setCancelUrl($cancel_url)
{
if(filter_var($cancel_url, FILTER_VALIDATE_URL) === false)
{
throw new \InvalidArgumentException("Cancel URL is not a fully qualified URL");
}
$this->cancel_url = $cancel_url;
return $this;
}
/**
* Get Cancel URL
* Url where the payer would be redirected to after canceling the payment
*
* @return string
*/
public function getCancelUrl()
{
return $this->cancel_url;
}
/**
* Set Cancel URL
* Url where the payer would be redirected to after canceling the payment
*
* @param string $cancel_url
*
* @deprecated Use setCancelUrl
*
* @return $this
*/
public function setCancel_url($cancel_url)
{
$this->cancel_url = $cancel_url;
return $this;
}
/**
* Get Cancel URL
* Url where the payer would be redirected to after canceling the payment
*
* @deprecated Use getCancelUrl
*
* @return string
*/
public function getCancel_url()
{
return $this->cancel_url;
}
}