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 voidcreateSavedPaymentMethodForFutureUse(@NonNull Payment payment, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Creates a saved payment method for future use from the givenPayment.voidcreateSavedPaymentMethodForFutureUse(@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 givenPaymentandPaymentResponse.getSavedPaymentMethodOwnership(@NonNull String savedPaymentMethodId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets anOwnershipSummaryof the saved payment method.populatePaymentFromSavedPaymentMethod(@NonNull Payment payment, @NonNull String savedPaymentMethodId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Populates the givenPaymentwith the saved payment method specified inPayment.getSavedPaymentMethodId().voidupdateSavedPaymentMethodBasedOnPaymentResponse(@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 givenPaymentandPaymentResponse.- Parameters:
payment- the payment that should be savedpaymentResponse- thePaymentResponsefrom 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- thePaymentResponsefrom 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 givenPaymentwith the saved payment method specified inPayment.getSavedPaymentMethodId(). -
getSavedPaymentMethodOwnership
OwnershipSummary getSavedPaymentMethodOwnership(@NonNull @NonNull String savedPaymentMethodId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets anOwnershipSummaryof 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
OwnershipSummarydescribing the ownership details of the saved payment method
-