Class CustomerPaymentAccountManagementService
java.lang.Object
com.broadleafcommerce.paymenttransaction.service.CustomerPaymentAccountManagementService
- All Implemented Interfaces:
SavedPaymentMethodManagementService
@Deprecated(since="1.0.2",
forRemoval=true)
public class CustomerPaymentAccountManagementService
extends Object
implements SavedPaymentMethodManagementService
Deprecated, for removal: This API element is subject to removal in a future version.
The implementation to support storing saved payment methods using
PaymentAccount and
CustomerServices, driven by CustomerPaymentAccountProvider.
This implementation can be turned on by configuring the
SavedPaymentMethodConfigurationProperties.getStorageLocation() to
DefaultSavedPaymentMethodStorageLocations.BLC_CUSTOMER_SERVICES.
- Author:
- Sunny Yu
-
Constructor Summary
ConstructorsConstructorDescriptionCustomerPaymentAccountManagementService(com.broadleafcommerce.common.extension.TypeFactory typeFactory, CustomerPaymentAccountProvider<PaymentAccount> paymentAccountProvider) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected AddressbuildBillingAddress(PaymentAccount paymentAccount) Deprecated, for removal: This API element is subject to removal in a future version.Builds anAddressfrom the givenPaymentAccount.protected OwnershipSummarybuildOwnershipSummary(@NonNull PaymentAccount paymentAccount) Deprecated, for removal: This API element is subject to removal in a future version.Builds theOwnershipSummarybased on the givenPaymentAccount.buildPaymentAccount(Payment payment) Deprecated, for removal: This API element is subject to removal in a future version.Builds aPaymentAccountfrom the givenPayment.voidcreateSavedPaymentMethodForFutureUse(Payment payment, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Creates a saved payment method for future use from the givenPaymentandPaymentResponse.protected InstantgetLastSuccessfulTransactionDate(Payment payment) Deprecated, for removal: This API element is subject to removal in a future version.Gets the last successful transaction date from the givenPayment.protected StringDeprecated, for removal: This API element is subject to removal in a future version.Gets the last successful transaction gateway response code from the givenPayment.protected PaymentTransactiongetLatestSuccessfulTransaction(Payment payment) Deprecated, for removal: This API element is subject to removal in a future version.Gets the latest successfulPaymentTransactionfrom the givenPayment.protected CustomerPaymentAccountProvider<PaymentAccount>Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Lazy injectedSavedPaymentMethodAccessValidationServicesince this service is itself a service component.getSavedPaymentMethodOwnership(String savedPaymentMethodId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Gets anOwnershipSummaryof the saved payment method.protected com.broadleafcommerce.common.extension.TypeFactoryDeprecated, for removal: This API element is subject to removal in a future version.populatePaymentFromSavedPaymentMethod(Payment payment, String savedPaymentMethodId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Populates the givenPaymentwith the saved payment method specified inPayment.getSavedPaymentMethodId().voidsetSavedPaymentMethodAccessValidationService(SavedPaymentMethodAccessValidationService savedPaymentMethodAccessValidationService) Deprecated, for removal: This API element is subject to removal in a future version.Lazy injectedSavedPaymentMethodAccessValidationServicesince this service is itself a service component.voidupdateSavedPaymentMethodBasedOnPaymentResponse(String savedPaymentMethodId, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Updates the saved payment method from the givenPaymentResponse.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.paymenttransaction.service.SavedPaymentMethodManagementService
createSavedPaymentMethodForFutureUse
-
Constructor Details
-
CustomerPaymentAccountManagementService
public CustomerPaymentAccountManagementService(com.broadleafcommerce.common.extension.TypeFactory typeFactory, CustomerPaymentAccountProvider<PaymentAccount> paymentAccountProvider) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
createSavedPaymentMethodForFutureUse
public void createSavedPaymentMethodForFutureUse(Payment payment, @Nullable com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SavedPaymentMethodManagementServiceCreates a saved payment method for future use from the givenPaymentandPaymentResponse.- Specified by:
createSavedPaymentMethodForFutureUsein interfaceSavedPaymentMethodManagementService- Parameters:
payment- the payment that should be savedpaymentResponse- thePaymentResponsefrom the transaction execution if there's anycontextInfo- context information related to multitenancy
-
updateSavedPaymentMethodBasedOnPaymentResponse
public void updateSavedPaymentMethodBasedOnPaymentResponse(String savedPaymentMethodId, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SavedPaymentMethodManagementServiceUpdates 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.
- Specified by:
updateSavedPaymentMethodBasedOnPaymentResponsein interfaceSavedPaymentMethodManagementService- Parameters:
savedPaymentMethodId- the id of the saved payment method to updatepaymentResponse- thePaymentResponsefrom the transaction executioncontextInfo- context information related to multitenancy
-
populatePaymentFromSavedPaymentMethod
public Payment populatePaymentFromSavedPaymentMethod(Payment payment, String savedPaymentMethodId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SavedPaymentMethodManagementServicePopulates the givenPaymentwith the saved payment method specified inPayment.getSavedPaymentMethodId().- Specified by:
populatePaymentFromSavedPaymentMethodin interfaceSavedPaymentMethodManagementService- Parameters:
payment- thePaymentto populate forsavedPaymentMethodId- the saved payment method id to retrieve the saved payment method fromcontextInfo- context information surrounding multitenant state- Returns:
- the
Paymentpopulated with the saved payment method
-
getSavedPaymentMethodOwnership
public OwnershipSummary getSavedPaymentMethodOwnership(String savedPaymentMethodId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SavedPaymentMethodManagementServiceGets anOwnershipSummaryof the saved payment method.- Specified by:
getSavedPaymentMethodOwnershipin interfaceSavedPaymentMethodManagementService- 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
-
buildOwnershipSummary
Deprecated, for removal: This API element is subject to removal in a future version.Builds theOwnershipSummarybased on the givenPaymentAccount.- Parameters:
paymentAccount- thePaymentAccountto build theOwnershipSummaryfor- Returns:
- the
OwnershipSummarybased on the givenPaymentAccount
-
buildBillingAddress
Deprecated, for removal: This API element is subject to removal in a future version.Builds anAddressfrom the givenPaymentAccount.- Parameters:
paymentAccount- thePaymentAccountto build theAddressfrom- Returns:
- an
Addressbuilt from the givenPaymentAccount
-
buildPaymentAccount
Deprecated, for removal: This API element is subject to removal in a future version.Builds aPaymentAccountfrom the givenPayment.- Parameters:
payment- thePaymentto build thePaymentAccountfrom- Returns:
- a
PaymentAccountfrom the givenPayment
-
getLastSuccessfulTransactionDate
Deprecated, for removal: This API element is subject to removal in a future version.Gets the last successful transaction date from the givenPayment. -
getLastSuccessfulTransactionGatewayResponseCode
Deprecated, for removal: This API element is subject to removal in a future version.Gets the last successful transaction gateway response code from the givenPayment. -
getLatestSuccessfulTransaction
Deprecated, for removal: This API element is subject to removal in a future version.Gets the latest successfulPaymentTransactionfrom the givenPayment.- Parameters:
payment- thePaymentto get the latest successfulPaymentTransactionfrom- Returns:
- the latest successful
PaymentTransactionfrom the givenPayment
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()Deprecated, for removal: This API element is subject to removal in a future version. -
getPaymentAccountProvider
Deprecated, for removal: This API element is subject to removal in a future version. -
getSavedPaymentMethodAccessValidationService
Deprecated, for removal: This API element is subject to removal in a future version.Lazy injectedSavedPaymentMethodAccessValidationServicesince this service is itself a service component.This avoids circular dependency exceptions
-
setSavedPaymentMethodAccessValidationService
@Autowired @Lazy public void setSavedPaymentMethodAccessValidationService(SavedPaymentMethodAccessValidationService savedPaymentMethodAccessValidationService) Deprecated, for removal: This API element is subject to removal in a future version.Lazy injectedSavedPaymentMethodAccessValidationServicesince this service is itself a service component.This avoids circular dependency exceptions
-
SavedPaymentMethodto manage saved payment methods.