Class ExperienceContext
java.lang.Object
com.broadleafcommerce.paypal.micro.gateway.domain.orders.ExperienceContext
- All Implemented Interfaces:
Serializable
- Author:
- Dima Myroniuk (dmyroniuk)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe label that overrides the business name in the PayPal account on the PayPal site.The URL where the customer is redirected after the customer cancels the payment.The type of landing page to show on the PayPal site for customer checkout.The BCP 47-formatted locale of pages that the PayPal payment experience shows.The merchant-preferred payment methods.The URL where the customer is redirected after the customer approves the payment.The location from which the shipping address is derived.Configures a Continue or Pay Now checkout flow.void
setBrandName
(String brandName) The label that overrides the business name in the PayPal account on the PayPal site.void
setCancelUrl
(String cancelUrl) The URL where the customer is redirected after the customer cancels the payment.void
setLandingPage
(String landingPage) The type of landing page to show on the PayPal site for customer checkout.void
The BCP 47-formatted locale of pages that the PayPal payment experience shows.void
setPaymentMethodPreference
(String paymentMethodPreference) The merchant-preferred payment methods.void
setReturnUrl
(String returnUrl) The URL where the customer is redirected after the customer approves the payment.void
setShippingPreference
(String shippingPreference) The location from which the shipping address is derived.void
setUserAction
(String userAction) Configures a Continue or Pay Now checkout flow.
-
Constructor Details
-
ExperienceContext
public ExperienceContext()
-
-
Method Details
-
setBrandName
The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode. -
setCancelUrl
The URL where the customer is redirected after the customer cancels the payment. -
setLandingPage
The type of landing page to show on the PayPal site for customer checkout. The possible values are:- LOGIN. When the customer clicks PayPal Checkout, the customer is redirected to a page to log in to PayPal and approve the payment.
- GUEST_CHECKOUT. When the customer clicks PayPal Checkout, the customer is redirected to a page to enter credit or debit card and other relevant billing information required to complete the purchase. This option has previously been also called as 'BILLING'
- NO_PREFERENCE. When the customer clicks PayPal Checkout, the customer is redirected to either a page to log in to PayPal and approve the payment or to a page to enter credit or debit card and other relevant billing information required to complete the purchase, depending on their previous interaction with PayPal.
-
setLocale
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. -
setPaymentMethodPreference
The merchant-preferred payment methods. The possible values are:- UNRESTRICTED. Accepts any type of payment from the customer.
- IMMEDIATE_PAYMENT_REQUIRED. Accepts only immediate payment from the customer. For example, credit card, PayPal balance, or instant ACH. Ensures that at the time of capture, the payment does not have the `pending` status.
-
setReturnUrl
The URL where the customer is redirected after the customer approves the payment. -
setShippingPreference
The location from which the shipping address is derived. The possible values are:- GET_FROM_FILE. Get the customer-provided shipping address on the PayPal site.
- NO_SHIPPING. Redacts the shipping address from the PayPal site. Recommended for digital goods.
- SET_PROVIDED_ADDRESS. Get the merchant-provided address. The customer cannot change this address on the PayPal site. If merchant does not pass an address, customer can choose the address on PayPal pages.
-
setUserAction
Configures a Continue or Pay Now checkout flow. The possible values are:- CONTINUE. After you redirect the customer to the PayPal payment page, a Continue button appears. Use this option when the final amount is not known when the checkout flow is initiated and you want to redirect the customer to the merchant page without processing the payment.
- PAY_NOW. After you redirect the customer to the PayPal payment page, a Pay Now button appears. Use this option when the final amount is known when the checkout is initiated and you want to process the payment immediately when the customer clicks Pay Now.
-
getBrandName
The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode. -
getCancelUrl
The URL where the customer is redirected after the customer cancels the payment. -
getLandingPage
The type of landing page to show on the PayPal site for customer checkout. The possible values are:- LOGIN. When the customer clicks PayPal Checkout, the customer is redirected to a page to log in to PayPal and approve the payment.
- GUEST_CHECKOUT. When the customer clicks PayPal Checkout, the customer is redirected to a page to enter credit or debit card and other relevant billing information required to complete the purchase. This option has previously been also called as 'BILLING'
- NO_PREFERENCE. When the customer clicks PayPal Checkout, the customer is redirected to either a page to log in to PayPal and approve the payment or to a page to enter credit or debit card and other relevant billing information required to complete the purchase, depending on their previous interaction with PayPal.
-
getLocale
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. -
getPaymentMethodPreference
The merchant-preferred payment methods. The possible values are:- UNRESTRICTED. Accepts any type of payment from the customer.
- IMMEDIATE_PAYMENT_REQUIRED. Accepts only immediate payment from the customer. For example, credit card, PayPal balance, or instant ACH. Ensures that at the time of capture, the payment does not have the `pending` status.
-
getReturnUrl
The URL where the customer is redirected after the customer approves the payment. -
getShippingPreference
The location from which the shipping address is derived. The possible values are:- GET_FROM_FILE. Get the customer-provided shipping address on the PayPal site.
- NO_SHIPPING. Redacts the shipping address from the PayPal site. Recommended for digital goods.
- SET_PROVIDED_ADDRESS. Get the merchant-provided address. The customer cannot change this address on the PayPal site. If merchant does not pass an address, customer can choose the address on PayPal pages.
-
getUserAction
Configures a Continue or Pay Now checkout flow. The possible values are:- CONTINUE. After you redirect the customer to the PayPal payment page, a Continue button appears. Use this option when the final amount is not known when the checkout flow is initiated and you want to redirect the customer to the merchant page without processing the payment.
- PAY_NOW. After you redirect the customer to the PayPal payment page, a Pay Now button appears. Use this option when the final amount is known when the checkout is initiated and you want to process the payment immediately when the customer clicks Pay Now.
-