Interface SavedPaymentMethodManagementService
- All Known Implementing Classes:
CustomerPaymentAccountManagementService
,DefaultSavedPaymentMethodManagementService
public interface SavedPaymentMethodManagementService
Service API for managing saved payment methods.
- Author:
- Sunny Yu
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
createSavedPaymentMethodForFutureUse
(@NonNull Payment payment, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Creates a saved payment method for future use from the givenPayment
.void
createSavedPaymentMethodForFutureUse
(@NonNull Payment payment, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Creates a saved payment method for future use from the givenPayment
andPaymentResponse
.getSavedPaymentMethodOwnership
(@NonNull String savedPaymentMethodId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets anOwnershipSummary
of the saved payment method.populatePaymentFromSavedPaymentMethod
(@NonNull Payment payment, @NonNull String savedPaymentMethodId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Populates the givenPayment
with the saved payment method specified inPayment.getSavedPaymentMethodId()
.default void
updateSavedPaymentMethodBasedOnPaymentResponse
(@NonNull SavedPaymentMethod savedPaymentMethod, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Updates the saved payment method from the givenPaymentResponse
.void
updateSavedPaymentMethodBasedOnPaymentResponse
(@NonNull String savedPaymentMethodId, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Updates the saved payment method from the givenPaymentResponse
.
-
Method Details
-
createSavedPaymentMethodForFutureUse
default void createSavedPaymentMethodForFutureUse(@NonNull @NonNull Payment payment, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Creates a saved payment method for future use from the givenPayment
.- Parameters:
payment
- the payment that should be savedcontextInfo
- context information related to multitenancy
-
createSavedPaymentMethodForFutureUse
void createSavedPaymentMethodForFutureUse(@NonNull @NonNull Payment payment, @Nullable com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Creates a saved payment method for future use from the givenPayment
andPaymentResponse
.- Parameters:
payment
- the payment that should be savedpaymentResponse
- thePaymentResponse
from the transaction execution if there's anycontextInfo
- context information related to multitenancy
-
updateSavedPaymentMethodBasedOnPaymentResponse
void updateSavedPaymentMethodBasedOnPaymentResponse(@NonNull @NonNull String savedPaymentMethodId, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Updates the saved payment method from the givenPaymentResponse
.This is typically used to update the last transaction date and response on a saved payment method after executing a transaction.
- Parameters:
savedPaymentMethodId
- the id of the saved payment method to updatepaymentResponse
- thePaymentResponse
from the transaction executioncontextInfo
- context information related to multitenancy
-
updateSavedPaymentMethodBasedOnPaymentResponse
default void updateSavedPaymentMethodBasedOnPaymentResponse(@NonNull @NonNull SavedPaymentMethod savedPaymentMethod, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Updates the saved payment method from the givenPaymentResponse
.This is typically used to update the last transaction date and response on a saved payment method after executing a transaction.
- Parameters:
savedPaymentMethod
- the saved payment method to updatepaymentResponse
- thePaymentResponse
from the transaction executioncontextInfo
- context information related to multitenancy
-
populatePaymentFromSavedPaymentMethod
Payment populatePaymentFromSavedPaymentMethod(@NonNull @NonNull Payment payment, @NonNull @NonNull String savedPaymentMethodId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Populates the givenPayment
with the saved payment method specified inPayment.getSavedPaymentMethodId()
. -
getSavedPaymentMethodOwnership
OwnershipSummary getSavedPaymentMethodOwnership(@NonNull @NonNull String savedPaymentMethodId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets anOwnershipSummary
of the saved payment method.- Parameters:
savedPaymentMethodId
- the saved payment method id to retrieve the saved payment method fromcontextInfo
- context information surrounding multitenant state- Returns:
- an
OwnershipSummary
describing the ownership details of the saved payment method
-