public class ValidateAndConfirmPaymentActivity extends BaseActivity<ProcessContext<CheckoutSeed>>
Verifies that there is enough payment on the order via the successful amount on PaymentTransactionType.AUTHORIZE and
PaymentTransactionType.AUTHORIZE_AND_CAPTURE transactions. This will also confirm any PaymentTransactionType.UNCONFIRMED transactions
that exist on am OrderPayment.
If there is an exception (either in this activity or later downstream) the confirmed payments are rolled back via ConfirmPaymentsRollbackHandler
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIRMED_TRANSACTIONS
Used by the
ConfirmPaymentsRollbackHandler to roll back transactions that this activity confirms. |
protected static org.apache.commons.logging.Log |
LOG |
protected OrderPaymentService |
orderPaymentService |
protected OrderToPaymentRequestDTOService |
orderToPaymentRequestService |
protected PaymentGatewayConfigurationServiceProvider |
paymentConfigurationServiceProvider |
protected SecureOrderPaymentService |
secureOrderPaymentService |
automaticallyRegisterRollbackHandler, beanName, errorHandler, order, rollbackHandler, rollbackRegion, stateConfiguration| Constructor and Description |
|---|
ValidateAndConfirmPaymentActivity() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
constructExpirationDate(Integer expMonth,
Integer expYear)
Default expiration date construction.
|
ProcessContext<CheckoutSeed> |
execute(ProcessContext<CheckoutSeed> context)
Called by the encompassing processor to activate
the execution of the Activity
|
protected String |
getGatewayExpirationDateFormat() |
protected void |
handleUnsuccessfulTransactions(List<PaymentResponseDTO> responseDTOs,
ProcessContext<CheckoutSeed> context)
Default implementation is to throw a generic CheckoutException which will be caught and displayed
on the Checkout Page where the Customer can try again.
|
protected void |
populateBillingAddressOnRequest(PaymentRequestDTO requestDTO,
OrderPayment payment) |
protected void |
populateCreditCardOnRequest(PaymentRequestDTO requestDTO,
OrderPayment payment) |
protected void |
populateCustomerOnRequest(PaymentRequestDTO requestDTO,
OrderPayment payment) |
getAutomaticallyRegisterRollbackHandler, getBeanName, getErrorHandler, getOrder, getRollbackHandler, getRollbackRegion, getStateConfiguration, setAutomaticallyRegisterRollbackHandler, setBeanName, setErrorHandler, setOrder, setRollbackHandler, setRollbackRegion, setStateConfiguration, shouldExecuteprotected static final org.apache.commons.logging.Log LOG
public static final String CONFIRMED_TRANSACTIONS
ConfirmPaymentsRollbackHandler to roll back transactions that this activity confirms.@Autowired(required=false) @Qualifier(value="blPaymentGatewayConfigurationServiceProvider") protected PaymentGatewayConfigurationServiceProvider paymentConfigurationServiceProvider
protected OrderToPaymentRequestDTOService orderToPaymentRequestService
protected OrderPaymentService orderPaymentService
protected SecureOrderPaymentService secureOrderPaymentService
public ProcessContext<CheckoutSeed> execute(ProcessContext<CheckoutSeed> context) throws Exception
Activitycontext - - process context for this workflowExceptionprotected void handleUnsuccessfulTransactions(List<PaymentResponseDTO> responseDTOs, ProcessContext<CheckoutSeed> context) throws Exception
responseDTOs - Exceptionprotected void populateCreditCardOnRequest(PaymentRequestDTO requestDTO, OrderPayment payment) throws WorkflowException
WorkflowExceptionprotected void populateBillingAddressOnRequest(PaymentRequestDTO requestDTO, OrderPayment payment)
protected void populateCustomerOnRequest(PaymentRequestDTO requestDTO, OrderPayment payment)
protected String constructExpirationDate(Integer expMonth, Integer expYear)
expMonth - expYear - protected String getGatewayExpirationDateFormat()
Copyright © 2015. All Rights Reserved.