@Service(value="blPaymentGatewayCheckoutService") public class DefaultPaymentGatewayCheckoutService extends Object implements PaymentGatewayCheckoutService
PaymentGatewayCheckoutService.PaymentGatewayAbstractController}| Modifier and Type | Field and Description |
|---|---|
protected CheckoutService |
checkoutService |
protected PaymentResponseDTOToEntityService |
dtoToEntityService |
protected OrderPaymentService |
orderPaymentService |
protected OrderService |
orderService |
protected boolean |
useBillingAddressFromGateway |
| Constructor and Description |
|---|
DefaultPaymentGatewayCheckoutService() |
| Modifier and Type | Method and Description |
|---|---|
Long |
applyPaymentToOrder(PaymentResponseDTO responseDTO,
PaymentGatewayConfiguration config) |
protected void |
handleUnsuccessfulTransaction(OrderPayment payment)
This default implementation will mark the entire payment as invalid and boot the user to re-enter their
billing info and payment information as there may be an error with either the billing address or credit card.
|
String |
initiateCheckout(Long orderId) |
boolean |
isUseBillingAddressFromGateway() |
String |
lookupOrderNumberFromOrderId(PaymentResponseDTO responseDTO) |
void |
markPaymentAsInvalid(Long orderPaymentId) |
void |
setUseBillingAddressFromGateway(boolean useBillingAddressFromGateway) |
protected OrderService orderService
protected OrderPaymentService orderPaymentService
protected CheckoutService checkoutService
protected PaymentResponseDTOToEntityService dtoToEntityService
@Value(value="${default.payment.gateway.checkout.useGatewayBillingAddress}")
protected boolean useBillingAddressFromGateway
public DefaultPaymentGatewayCheckoutService()
public Long applyPaymentToOrder(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config)
applyPaymentToOrder in interface PaymentGatewayCheckoutServiceprotected void handleUnsuccessfulTransaction(OrderPayment payment)
payment - public void markPaymentAsInvalid(Long orderPaymentId)
markPaymentAsInvalid in interface PaymentGatewayCheckoutServicepublic String initiateCheckout(Long orderId) throws Exception
initiateCheckout in interface PaymentGatewayCheckoutServiceExceptionpublic String lookupOrderNumberFromOrderId(PaymentResponseDTO responseDTO)
lookupOrderNumberFromOrderId in interface PaymentGatewayCheckoutServicepublic boolean isUseBillingAddressFromGateway()
public void setUseBillingAddressFromGateway(boolean useBillingAddressFromGateway)
Copyright © 2018. All rights reserved.