Interface PayPalCheckoutConfiguration

All Superinterfaces:
org.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration
All Known Implementing Classes:
PayPalCheckoutConfigurationImpl

public interface PayPalCheckoutConfiguration extends org.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration
Author:
Elbert Bautista (elbertbautista)
  • Method Details

    • getReturnUrl

      String getReturnUrl()
      URL to which the buyer's browser is returned after choosing to pay with PayPal. For digital goods, you must add JavaScript to this page to close the in-context experience. Note: PayPal recommends that the value be the final review page on which the buyer confirms the order and payment or billing agreement. Character length and limitations: 2048 single-byte characters
      Returns:
      String
    • getCancelUrl

      String getCancelUrl()
      URL to which the buyer is returned if the buyer does not approve the use of PayPal to pay you. For digital goods, you must add JavaScript to this page to close the in-context experience. Note: PayPal recommends that the value be the original page on which the buyer chose to pay with PayPal or establish a billing agreement. Character length and limitations: 2048 single-byte characters
      Returns:
    • getWebProfileId

      String getWebProfileId()
      Gets the the property driven id of the WebProfile to be used when creating payments. For more information on WebProfiles go to {@link https://developer.paypal.com/docs/integration/direct/payment-experience/} PayPalWebProfileService#getWebProfileId() should be used instead if you want to find the web profile id to create a payment since it has the ability to create new WebProfiles based on injected beans along with using this method
      Returns:
    • getSmartPaymentEnvironment

      String getSmartPaymentEnvironment()
    • getShippingDisplayType

      PayPalShippingDisplayType getShippingDisplayType()
      For digital goods, this field is required and must be set to 1. 0 - PayPal displays the shipping address passed in. 1 - PayPal does not display the shipping fields at all. (Default) 2 - PayPal will obtain the shipping address from the buyer's profile.
      Returns:
      PayPalShippingDisplayType
    • getTotalType

      String getTotalType()
      Type declaration for the label to be displayed in MiniCart for UX. It is one of the following values: - Total - EstimatedTotal
      Returns:
      String
    • getAdditionalConfig

      Map<String,String> getAdditionalConfig()

      See the PayPal API to see what additional configs you can set: https://developer.paypal.com/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/

      e.g. Map<String, String> additionalConfigs = new HashMap<String, String>(); additionalConfigs.put("HDRBORDERCOLOR", "FFFFFF"); additionalConfigs.put("HDRBACKCOLOR", "FFFFFF"); additionalConfigs.put("PAYFLOWCOLOR", "FFFFFF");

      This adds additional NVP items to the Paypal request that are ONLY pre-specified in the Paypal API docs. Any other fields will be ignored. If you want to use completely custom fields, see getAdditionalCustomFields()

      Returns:
      Map
    • getAdditionalCustomFields

      Map<String,String> getAdditionalCustomFields()

      The Paypal NVP API only allows a single field with custom logic in it: PAYMENTREQUEST_n_CUSTOM. Because of this, all of the fields returned here are serialized together like so:

       ccoc=true_12345|key1=value1|key2=value2|key3=value3
       

      Note that Broadleaf uses a piece of this to determine if we should complete checkout on callback or not. This is done as "ccoc=true_12345" where true is the value of PaymentRequestDTO.isCompleteCheckoutOnCallback(). So, the minimum string that will be contained in the custom field is ccoc=true_12345, plus whatever other fields you have.

      Also note that the entire custom field string after serialization is 256 characters. An IllegalArgumentException will be thrown otherwise.

    • getPaymentDescription

      String getPaymentDescription()
    • getCheckoutRestClientId

      String getCheckoutRestClientId()
    • getCheckoutRestSecret

      String getCheckoutRestSecret()
    • getCheckoutRestMode

      String getCheckoutRestMode()