@Service(value="blPaymentGatewayCheckoutService") public class DefaultPaymentGatewayCheckoutService extends Object implements PaymentGatewayCheckoutService
PaymentGatewayCheckoutService.PaymentGatewayAbstractController}| Modifier and Type | Field and Description |
|---|---|
protected AddressService |
addressService |
protected CheckoutService |
checkoutService |
protected CountryService |
countryService |
protected FulfillmentGroupService |
fulfillmentGroupService |
protected OrderPaymentService |
orderPaymentService |
protected OrderService |
orderService |
protected PhoneService |
phoneService |
protected StateService |
stateService |
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) |
protected void |
populateBillingInfo(PaymentResponseDTO responseDTO,
OrderPayment payment,
Address tempBillingAddress) |
protected void |
populateShippingInfo(PaymentResponseDTO responseDTO,
Order order) |
void |
setUseBillingAddressFromGateway(boolean useBillingAddressFromGateway) |
protected OrderService orderService
protected OrderPaymentService orderPaymentService
protected CheckoutService checkoutService
protected AddressService addressService
protected StateService stateService
protected CountryService countryService
protected PhoneService phoneService
protected FulfillmentGroupService fulfillmentGroupService
@Value(value="${default.payment.gateway.checkout.useGatewayBillingAddress}")
protected boolean useBillingAddressFromGateway
public DefaultPaymentGatewayCheckoutService()
public Long applyPaymentToOrder(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config)
applyPaymentToOrder in interface PaymentGatewayCheckoutServiceprotected void populateBillingInfo(PaymentResponseDTO responseDTO, OrderPayment payment, Address tempBillingAddress)
protected void populateShippingInfo(PaymentResponseDTO responseDTO, Order order)
protected 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 © 2015. All Rights Reserved.