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
ConstructorDescriptionCustomerPaymentAccountManagementService
(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 Address
buildBillingAddress
(PaymentAccount paymentAccount) Deprecated, for removal: This API element is subject to removal in a future version.Builds anAddress
from the givenPaymentAccount
.protected OwnershipSummary
buildOwnershipSummary
(@NonNull PaymentAccount paymentAccount) Deprecated, for removal: This API element is subject to removal in a future version.Builds theOwnershipSummary
based on the givenPaymentAccount
.buildPaymentAccount
(Payment payment) Deprecated, for removal: This API element is subject to removal in a future version.Builds aPaymentAccount
from the givenPayment
.void
createSavedPaymentMethodForFutureUse
(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 givenPayment
andPaymentResponse
.protected Instant
getLastSuccessfulTransactionDate
(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 String
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
.protected PaymentTransaction
getLatestSuccessfulTransaction
(Payment payment) Deprecated, for removal: This API element is subject to removal in a future version.Gets the latest successfulPaymentTransaction
from 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 injectedSavedPaymentMethodAccessValidationService
since 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 anOwnershipSummary
of the saved payment method.protected com.broadleafcommerce.common.extension.TypeFactory
Deprecated, 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 givenPayment
with the saved payment method specified inPayment.getSavedPaymentMethodId()
.void
setSavedPaymentMethodAccessValidationService
(SavedPaymentMethodAccessValidationService savedPaymentMethodAccessValidationService) Deprecated, for removal: This API element is subject to removal in a future version.Lazy injectedSavedPaymentMethodAccessValidationService
since this service is itself a service component.void
updateSavedPaymentMethodBasedOnPaymentResponse
(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, wait
Methods inherited from interface com.broadleafcommerce.paymenttransaction.service.SavedPaymentMethodManagementService
createSavedPaymentMethodForFutureUse, updateSavedPaymentMethodBasedOnPaymentResponse
-
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:SavedPaymentMethodManagementService
Creates a saved payment method for future use from the givenPayment
andPaymentResponse
.- Specified by:
createSavedPaymentMethodForFutureUse
in interfaceSavedPaymentMethodManagementService
- Parameters:
payment
- the payment that should be savedpaymentResponse
- thePaymentResponse
from 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:SavedPaymentMethodManagementService
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.
- Specified by:
updateSavedPaymentMethodBasedOnPaymentResponse
in interfaceSavedPaymentMethodManagementService
- Parameters:
savedPaymentMethodId
- the id of the saved payment method to updatepaymentResponse
- thePaymentResponse
from 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:SavedPaymentMethodManagementService
Populates the givenPayment
with the saved payment method specified inPayment.getSavedPaymentMethodId()
.- Specified by:
populatePaymentFromSavedPaymentMethod
in interfaceSavedPaymentMethodManagementService
- Parameters:
payment
- thePayment
to populate forsavedPaymentMethodId
- the saved payment method id to retrieve the saved payment method fromcontextInfo
- context information surrounding multitenant state- Returns:
- the
Payment
populated 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:SavedPaymentMethodManagementService
Gets anOwnershipSummary
of the saved payment method.- Specified by:
getSavedPaymentMethodOwnership
in interfaceSavedPaymentMethodManagementService
- 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
-
buildOwnershipSummary
Deprecated, for removal: This API element is subject to removal in a future version.Builds theOwnershipSummary
based on the givenPaymentAccount
.- Parameters:
paymentAccount
- thePaymentAccount
to build theOwnershipSummary
for- Returns:
- the
OwnershipSummary
based on the givenPaymentAccount
-
buildBillingAddress
Deprecated, for removal: This API element is subject to removal in a future version.Builds anAddress
from the givenPaymentAccount
.- Parameters:
paymentAccount
- thePaymentAccount
to build theAddress
from- Returns:
- an
Address
built from the givenPaymentAccount
-
buildPaymentAccount
Deprecated, for removal: This API element is subject to removal in a future version.Builds aPaymentAccount
from the givenPayment
.- Parameters:
payment
- thePayment
to build thePaymentAccount
from- Returns:
- a
PaymentAccount
from 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 successfulPaymentTransaction
from the givenPayment
.- Parameters:
payment
- thePayment
to get the latest successfulPaymentTransaction
from- Returns:
- the latest successful
PaymentTransaction
from 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 injectedSavedPaymentMethodAccessValidationService
since 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 injectedSavedPaymentMethodAccessValidationService
since this service is itself a service component.This avoids circular dependency exceptions
-
SavedPaymentMethod
to manage saved payment methods.