Interface PaymentGatewaySavedPaymentMethodService
- All Superinterfaces:
PaymentGatewayTypeAware
This service is responsible for interacting with the payment gateway for the saved payment
methods. This service can be used to modify, add or remove the payment method properties before
the saved payment method will be created, updated or removed.
- Author:
- Dima Myroniuk (dmyroniuk)
-
Method Summary
Modifier and TypeMethodDescriptiondefault PaymentCustomerNotification
buildCustomerNotification
(SavedPaymentMethodInfo savedPaymentMethodInfo, String applicationId, String tenantId) This method is used to build the notification that should be sent to the customer when the saved payment method is created.deleteGatewaySavedPaymentMethod
(@NonNull PaymentInfo paymentInfo, String applicationId, String tenantId) The handler is used to modify, add or remove the payment method properties before deleting the saved payment method.exchangeSingleUseTokenIfApplicable
(@NonNull Map<String, String> paymentMethodProperties, String tenantId, String applicationId) Deprecated, for removal: This API element is subject to removal in a future version.modifyPaymentMethodPropertiesForCreate
(@NonNull PaymentInfo paymentInfo, String applicationId, String tenantId) The handler is used to modify, add or remove the payment method properties before creating the saved payment method.modifyPaymentMethodPropertiesForUpdate
(@NonNull PaymentInfo originalPaymentInfo, @NonNull PaymentInfo updatedPaymentInfo, String applicationId, String tenantId) The handler is used to modify, add or remove the payment method properties before updating the saved payment method.Methods inherited from interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTypeAware
getGatewayType
-
Method Details
-
exchangeSingleUseTokenIfApplicable
@Deprecated(forRemoval=true) default Map<String,String> exchangeSingleUseTokenIfApplicable(@NonNull @NonNull Map<String, String> paymentMethodProperties, @Nullable String tenantId, @Nullable String applicationId) Deprecated, for removal: This API element is subject to removal in a future version.Exchanges the short-lived (typically single-use) payment token for a long-lived, multi-use token.- Parameters:
paymentMethodProperties
- the map that contains the single-use payment token. This map shouldn't be modified.tenantId
- the id for the current tenantapplicationId
- the id for the current application- Returns:
- the map that contains the multi-use payment token
- Throws:
ExchangeSingleUseTokenException
- when an error occurred during token exchanging
-
modifyPaymentMethodPropertiesForCreate
default Map<String,String> modifyPaymentMethodPropertiesForCreate(@NonNull @NonNull PaymentInfo paymentInfo, @Nullable String applicationId, @Nullable String tenantId) The handler is used to modify, add or remove the payment method properties before creating the saved payment method.- Parameters:
paymentInfo
- the information about paymentapplicationId
- the id for the current applicationtenantId
- the id for the current tenant- Returns:
- the modified payment method properties
- Throws:
PaymentMethodPropertiesModificationException
- when an error occurred during the modification of the payment method properties
-
modifyPaymentMethodPropertiesForUpdate
default Map<String,String> modifyPaymentMethodPropertiesForUpdate(@NonNull @NonNull PaymentInfo originalPaymentInfo, @NonNull @NonNull PaymentInfo updatedPaymentInfo, @Nullable String applicationId, @Nullable String tenantId) The handler is used to modify, add or remove the payment method properties before updating the saved payment method.- Parameters:
originalPaymentInfo
- thePaymentInfo
reflecting the payment's original stateupdatedPaymentInfo
- thePaymentInfo
reflecting the payment's updated stateapplicationId
- the id for the current applicationtenantId
- the id for the current tenant- Returns:
- The reuse token properties
- Throws:
PaymentMethodPropertiesModificationException
- when an error occurred during the modification of the payment method properties
-
deleteGatewaySavedPaymentMethod
default Map<String,String> deleteGatewaySavedPaymentMethod(@NonNull @NonNull PaymentInfo paymentInfo, @Nullable String applicationId, @Nullable String tenantId) The handler is used to modify, add or remove the payment method properties before deleting the saved payment method.- Parameters:
paymentInfo
- thePaymentInfo
reflecting the payment current stateapplicationId
- the id for the current applicationtenantId
- the id for the current tenant- Returns:
- the modified payment method properties
- Throws:
PaymentMethodPropertiesModificationException
- when an error occurred during the modification of the payment method properties
-
buildCustomerNotification
@Nullable default PaymentCustomerNotification buildCustomerNotification(SavedPaymentMethodInfo savedPaymentMethodInfo, @Nullable String applicationId, @Nullable String tenantId) This method is used to build the notification that should be sent to the customer when the saved payment method is created.- Parameters:
savedPaymentMethodInfo
- theSavedPaymentMethodInfo
that represents the information about the saved payment methodapplicationId
- the id for the current applicationtenantId
- the id for the current tenant- Returns:
- the payment notification that should be sent to the customer
-
modifyPaymentMethodPropertiesForCreate(PaymentInfo, String, String)