@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 ISOService |
isoService |
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)
Initiates the checkout process for a given orderId.
|
boolean |
isUseBillingAddressFromGateway() |
String |
lookupOrderNumberFromOrderId(PaymentResponseDTO responseDTO)
Looks up the order number for a particular order id from the
PaymentResponseDTO. |
void |
markPaymentAsInvalid(Long orderPaymentId)
Marks a given order payment as invalid.
|
protected void |
populateAddressInfo(Address address,
AddressDTO<PaymentResponseDTO> dto) |
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 ISOService isoService
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 PaymentGatewayCheckoutServiceresponseDTO - the response that came back from the gatewayPaymentGatewayCheckoutService.markPaymentAsInvalid(Long)protected void populateBillingInfo(PaymentResponseDTO responseDTO, OrderPayment payment, Address tempBillingAddress)
protected void populateShippingInfo(PaymentResponseDTO responseDTO, Order order)
protected void populateAddressInfo(Address address, AddressDTO<PaymentResponseDTO> dto)
protected void handleUnsuccessfulTransaction(OrderPayment payment)
payment - public void markPaymentAsInvalid(Long orderPaymentId)
PaymentGatewayCheckoutServicePaymentGatewayCheckoutService.applyPaymentToOrder(PaymentResponseDTO, PaymentGatewayConfiguration)markPaymentAsInvalid in interface PaymentGatewayCheckoutServiceorderPaymentId - the payment ID to mark as invalidpublic String initiateCheckout(Long orderId) throws Exception
PaymentGatewayCheckoutServicePaymentResponseDTO.getOrderId()initiateCheckout in interface PaymentGatewayCheckoutServiceorderId - the order to check outExceptionpublic String lookupOrderNumberFromOrderId(PaymentResponseDTO responseDTO)
PaymentGatewayCheckoutServicePaymentResponseDTO. This can be used to redirect
the user coming from the payment gateway to the order confirmation page.lookupOrderNumberFromOrderId in interface PaymentGatewayCheckoutServiceresponseDTO - the response from the gatewaypublic boolean isUseBillingAddressFromGateway()
public void setUseBillingAddressFromGateway(boolean useBillingAddressFromGateway)
Copyright © 2015. All rights reserved.