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 49b80f76af Removing Dependency from SDK Core Project
- Copied files required for Rest API SDK
- Removed PPApiContext and directly connected APIContext with PPConfigManager
- Removed duplicate data storage of configuration and credentials.
- Code Style Fixes
- Remove build.xml file as it is not required anymore
- Updated the samples
- Updated the documentations
2014-10-06 11:16:47 -05:00

135 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;
}
}