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 App Switch Preference to configure whether or not to launch the checkout within the PayPal App.The 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 preference to display the contact information (buyer’s shipping email & phone number) on PayPal's checkout for easy merchant-buyer communication.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 callback configuration for fulfillment address & fulfillment options.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.voidsetAppSwitchPreference(AppSwitchPreference appSwitchPreference) The App Switch Preference to configure whether or not to launch the checkout within the PayPal App.voidsetBrandName(String brandName) The label that overrides the business name in the PayPal account on the PayPal site.voidsetCancelUrl(String cancelUrl) The URL where the customer is redirected after the customer cancels the payment.voidsetContactPreference(String contactPreference) The preference to display the contact information (buyer’s shipping email & phone number) on PayPal's checkout for easy merchant-buyer communication.voidsetLandingPage(String landingPage) The type of landing page to show on the PayPal site for customer checkout.voidThe BCP 47-formatted locale of pages that the PayPal payment experience shows.voidsetOrderUpdateCallbackConfig(OrderUpdateCallbackConfig orderUpdateCallbackConfig) The callback configuration for fulfillment address & fulfillment options.voidsetPaymentMethodPreference(String paymentMethodPreference) The merchant-preferred payment methods.voidsetReturnUrl(String returnUrl) The URL where the customer is redirected after the customer approves the payment.voidsetShippingPreference(String shippingPreference) The location from which the shipping address is derived.voidsetUserAction(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.
-
setContactPreference
The preference to display the contact information (buyer’s shipping email & phone number) on PayPal's checkout for easy merchant-buyer communication. The possible values are:- NO_CONTACT_INFO. Opts out of showing the buyer's contact information on PayPal checkout.
- UPDATE_CONTACT_INFO. Allows the buyer to add or update shipping contact information on the PayPal checkout.
- RETAIN_CONTACT_INFO. The buyer can only see but can not override the passed contact information
- Since:
- Micro PayPal 3.0.2
-
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.
-
setAppSwitchPreference
The App Switch Preference to configure whether or not to launch the checkout within the PayPal App.- Since:
- Micro PayPal 3.0.2
-
setOrderUpdateCallbackConfig
The callback configuration for fulfillment address & fulfillment options. Not supported when the shipping type is specified or when `shipping_preference` is set as 'NO_SHIPPING' or 'SET_PROVIDED_ADDRESS'.- Since:
- Micro PayPal 3.0.2
-
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.
-
getContactPreference
The preference to display the contact information (buyer’s shipping email & phone number) on PayPal's checkout for easy merchant-buyer communication. The possible values are:- NO_CONTACT_INFO. Opts out of showing the buyer's contact information on PayPal checkout.
- UPDATE_CONTACT_INFO. Allows the buyer to add or update shipping contact information on the PayPal checkout.
- RETAIN_CONTACT_INFO. The buyer can only see but can not override the passed contact information
- Since:
- Micro PayPal 3.0.2
-
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.
-
getAppSwitchPreference
The App Switch Preference to configure whether or not to launch the checkout within the PayPal App.- Since:
- Micro PayPal 3.0.2
-
getOrderUpdateCallbackConfig
The callback configuration for fulfillment address & fulfillment options. Not supported when the shipping type is specified or when `shipping_preference` is set as 'NO_SHIPPING' or 'SET_PROVIDED_ADDRESS'.- Since:
- Micro PayPal 3.0.2
-