Class PayPalCheckoutConfigurationImpl
- All Implemented Interfaces:
org.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration,PayPalCheckoutConfiguration
- Author:
- Elbert Bautista (elbertbautista)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.core.env.Environmentprotected intprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSee the PayPal API to see what additional configs you can set: https://developer.paypal.com/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/The Paypal NVP API only allows a single field with custom logic in it: PAYMENTREQUEST_n_CUSTOM.intorg.broadleafcommerce.common.payment.PaymentGatewayTypeType declaration for the label to be displayed in MiniCart for UX.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidsetFailureReportingThreshold(int failureReportingThreshold) voidsetPerformAuthorizeAndCapture(boolean performAuthorizeAndCapture)
-
Field Details
-
env
@Autowired protected org.springframework.core.env.Environment env -
failureReportingThreshold
protected int failureReportingThreshold -
performAuthorizeAndCapture
protected boolean performAuthorizeAndCapture
-
-
Constructor Details
-
PayPalCheckoutConfigurationImpl
public PayPalCheckoutConfigurationImpl()
-
-
Method Details
-
getPaymentDescription
- Specified by:
getPaymentDescriptionin interfacePayPalCheckoutConfiguration
-
getEnvironment
- Specified by:
getEnvironmentin interfacePayPalCheckoutConfiguration
-
getTotalType
Description copied from interface:PayPalCheckoutConfigurationType declaration for the label to be displayed in MiniCart for UX. It is one of the following values: - Total - EstimatedTotal- Specified by:
getTotalTypein interfacePayPalCheckoutConfiguration- Returns:
- String
-
getAdditionalConfig
Description copied from interface:PayPalCheckoutConfigurationSee 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
PayPalCheckoutConfiguration.getAdditionalCustomFields()- Specified by:
getAdditionalConfigin interfacePayPalCheckoutConfiguration- Returns:
- Map
-
getAdditionalCustomFields
Description copied from interface:PayPalCheckoutConfigurationThe 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=value3Note 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
trueis the value ofPaymentRequestDTO.isCompleteCheckoutOnCallback(). So, the minimum string that will be contained in the custom field isccoc=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.
- Specified by:
getAdditionalCustomFieldsin interfacePayPalCheckoutConfiguration
-
getClientId
- Specified by:
getClientIdin interfacePayPalCheckoutConfiguration
-
getClientSecret
- Specified by:
getClientSecretin interfacePayPalCheckoutConfiguration
-
handlesAuthorize
public boolean handlesAuthorize()- Specified by:
handlesAuthorizein interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
handlesAuthorizein classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-
handlesCapture
public boolean handlesCapture()- Specified by:
handlesCapturein interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
handlesCapturein classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-
handlesAuthorizeAndCapture
public boolean handlesAuthorizeAndCapture()- Specified by:
handlesAuthorizeAndCapturein interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
handlesAuthorizeAndCapturein classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-
handlesReverseAuthorize
public boolean handlesReverseAuthorize()- Specified by:
handlesReverseAuthorizein interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
handlesReverseAuthorizein classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-
handlesVoid
public boolean handlesVoid()- Specified by:
handlesVoidin interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
handlesVoidin classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-
handlesRefund
public boolean handlesRefund()- Specified by:
handlesRefundin interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
handlesRefundin classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-
handlesPartialCapture
public boolean handlesPartialCapture()- Specified by:
handlesPartialCapturein interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
handlesPartialCapturein classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-
handlesMultipleShipment
public boolean handlesMultipleShipment()- Specified by:
handlesMultipleShipmentin interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
handlesMultipleShipmentin classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-
handlesRecurringPayment
public boolean handlesRecurringPayment()- Specified by:
handlesRecurringPaymentin interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
handlesRecurringPaymentin classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-
handlesSavedCustomerPayment
public boolean handlesSavedCustomerPayment()- Specified by:
handlesSavedCustomerPaymentin interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
handlesSavedCustomerPaymentin classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-
isPerformAuthorizeAndCapture
public boolean isPerformAuthorizeAndCapture()- Specified by:
isPerformAuthorizeAndCapturein interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
isPerformAuthorizeAndCapturein classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-
setPerformAuthorizeAndCapture
public void setPerformAuthorizeAndCapture(boolean performAuthorizeAndCapture) - Specified by:
setPerformAuthorizeAndCapturein interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
setPerformAuthorizeAndCapturein classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-
getFailureReportingThreshold
public int getFailureReportingThreshold()- Specified by:
getFailureReportingThresholdin interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
getFailureReportingThresholdin classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-
setFailureReportingThreshold
public void setFailureReportingThreshold(int failureReportingThreshold) - Specified by:
setFailureReportingThresholdin interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
setFailureReportingThresholdin classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-
handlesMultiplePayments
public boolean handlesMultiplePayments()- Specified by:
handlesMultiplePaymentsin interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
handlesMultiplePaymentsin classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-
getGatewayType
public org.broadleafcommerce.common.payment.PaymentGatewayType getGatewayType()- Specified by:
getGatewayTypein interfaceorg.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration- Overrides:
getGatewayTypein classorg.broadleafcommerce.common.payment.service.AbstractPaymentGatewayConfiguration
-