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
japatel 29a8d8f50d Renaming Namespaces and Organizing Classes
- Updated OpenId classes to be in API namespace
- Updated PP Naming Convention to PayPal Naming Convention
- FormatConverter Class got its own namespace
- Handlers are grouped in Handler namespace
- Samples and Tests Updated Accordingly
2014-12-17 17:17:29 -06:00

122 lines
2.7 KiB
PHP

<?php
namespace PayPal\Api;
use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Validation\UrlValidator;
/**
* Class RedirectUrls
*
* Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
*
* @package PayPal\Api
*
* @property string return_url
* @property string cancel_url
*/
class RedirectUrls extends PayPalModel
{
/**
* Url where the payer would be redirected to after approving the payment.
*
*
* @param string $return_url
* @throws InvalidArgumentException
* @return $this
*/
public function setReturnUrl($return_url)
{
UrlValidator::validate($return_url, "ReturnUrl");
$this->return_url = $return_url;
return $this;
}
/**
* Url where the payer would be redirected to after approving the payment.
*
* @return string
*/
public function getReturnUrl()
{
return $this->return_url;
}
/**
* Url where the payer would be redirected to after approving the payment.
*
* @deprecated Instead use setReturnUrl
*
* @param string $return_url
* @return $this
*/
public function setReturn_url($return_url)
{
$this->return_url = $return_url;
return $this;
}
/**
* Url where the payer would be redirected to after approving the payment.
* @deprecated Instead use getReturnUrl
*
* @return string
*/
public function getReturn_url()
{
return $this->return_url;
}
/**
* Url where the payer would be redirected to after canceling the payment.
*
*
* @param string $cancel_url
* @throws InvalidArgumentException
* @return $this
*/
public function setCancelUrl($cancel_url)
{
UrlValidator::validate($cancel_url, "CancelUrl");
$this->cancel_url = $cancel_url;
return $this;
}
/**
* Url where the payer would be redirected to after canceling the payment.
*
* @return string
*/
public function getCancelUrl()
{
return $this->cancel_url;
}
/**
* Url where the payer would be redirected to after canceling the payment.
*
* @deprecated Instead use setCancelUrl
*
* @param string $cancel_url
* @return $this
*/
public function setCancel_url($cancel_url)
{
$this->cancel_url = $cancel_url;
return $this;
}
/**
* Url where the payer would be redirected to after canceling the payment.
* @deprecated Instead use getCancelUrl
*
* @return string
*/
public function getCancel_url()
{
return $this->cancel_url;
}
}