Application Context
See https://developer.paypal.com/docs/api/orders/v2/#definition-order_application_context
Methods
ApplicationContext::__construct()
Creates an application context object using constructor.
Signature
public function __construct(
?string $brand_name = null,
?string $locale = 'en-US',
?string $landing_page = NO_PREFERENCE,
?string $shipping_preference = NO_SHIPPING,
?string $return_url = null,
?string $cancel_url = null
);Example
$application_context = new ApplicationContext('PHPJuice', 'en-US');ApplicationContext::create()
Helper method to create an ApplicationContext statically.
Signature
Example
ApplicationContext::getBrandName()
Returns the brand name value from the application context.
Signature
Example
ApplicationContext::setBrandName()
Sets the brand name value on an application context.
Signature
Example
ApplicationContext::getLocale()
Returns the locale value from the application context, default to en-US.
Signature
Example
ApplicationContext::setLocale()
Sets a locale on an application context.
Signature
Example
ApplicationContext::getShippingPreference()
Returns the shipping preference value from an application context, default to NO_SHIPPING.
Signature
Example
ApplicationContext::setShippingPreference()
Sets a shipping preference value on an application context.
Signature
Available shipping preference options
Example
ApplicationContext::getLandingPage()
Returns the landing page value from an application context, default to NO_PREFERENCE.
Signature
Example
ApplicationContext::setLandingPage()
Sets a landing page value on an application context.
Signature
Available landing page options
Example
ApplicationContext::getUserAction()
Returns the user action value from an application context, default to CONTINUE.
Signature
Example
ApplicationContext::setUserAction()
Sets a user action value on an application context.
Signature
Available user action options
Example
ApplicationContext::getReturnUrl()
Returns the return url value from an application context, default to null.
Signature
Example
ApplicationContext::setReturnUrl()
Sets a return url value on an application context.
Signature
Example
ApplicationContext::getCancelUrl()
Returns the cancel url value from an application context, default to null.
Signature
Example
ApplicationContext::setCancelUrl()
Sets a cancel url value on an application context.
Signature
Example
Last updated
Was this helpful?