forked from LiveCarta/PayPal-PHP-Server-SDK
* Automated commit message * Automated commit message * add changelog --------- Co-authored-by: PayPalServerSDKs <server-sdks@paypal.com>
2.5 KiB
2.5 KiB
Subscription Patch Application Context
The application context, which customizes the payer experience during the subscription approval process with PayPal.
Structure
SubscriptionPatchApplicationContext
Fields
| Name | Type | Tags | Description | Getter | Setter |
|---|---|---|---|---|---|
brandName |
?string |
Optional | The label that overrides the business name in the PayPal account on the PayPal site. Constraints: Minimum Length: 1, Maximum Length: 127, Pattern: ^.*$ |
getBrandName(): ?string | setBrandName(?string brandName): void |
locale |
?string |
Optional | The BCP 47-formatted locale of pages that the PayPal payment experience shows. PayPal supports a five-character code. For example, da-DK, he-IL, id-ID, ja-JP, no-NO, pt-BR, ru-RU, sv-SE, th-TH, zh-CN, zh-HK, or zh-TW.Constraints: Minimum Length: 2, Maximum Length: 10, Pattern: ^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}|[0-9]{3}))?$ |
getLocale(): ?string | setLocale(?string locale): void |
shippingPreference |
?string(ExperienceContextShippingPreference) |
Optional | The location from which the shipping address is derived. Default: ExperienceContextShippingPreference::GET_FROM_FILEConstraints: Minimum Length: 1, Maximum Length: 24, Pattern: ^[A-Z_]+$ |
getShippingPreference(): ?string | setShippingPreference(?string shippingPreference): void |
paymentMethod |
?PaymentMethod |
Optional | The customer and merchant payment preferences. | getPaymentMethod(): ?PaymentMethod | setPaymentMethod(?PaymentMethod paymentMethod): void |
returnUrl |
string |
Required | The URL where the customer is redirected after the customer approves the payment. Constraints: Minimum Length: 10, Maximum Length: 4000 |
getReturnUrl(): string | setReturnUrl(string returnUrl): void |
cancelUrl |
string |
Required | The URL where the customer is redirected after the customer cancels the payment. Constraints: Minimum Length: 10, Maximum Length: 4000 |
getCancelUrl(): string | setCancelUrl(string cancelUrl): void |
Example (as JSON)
{
"shipping_preference": "GET_FROM_FILE",
"return_url": "return_url4",
"cancel_url": "cancel_url8",
"brand_name": "brand_name4",
"locale": "locale8",
"payment_method": {
"payee_preferred": "UNRESTRICTED"
}
}