public interface PaymentGatewayCheckoutService
This is designed as a generic contract for allowing payment modules to add payments to an order represented in Broadleaf while still staying decoupled from any of the Broadleaf core framework concepts.
| Modifier and Type | Method and Description |
|---|---|
Long |
applyPaymentToOrder(PaymentResponse responseDTO,
PaymentGatewayConfiguration config) |
String |
initiateCheckout(Long orderId)
Initiates the checkout process for a given orderId.
|
String |
lookupOrderNumberFromOrderId(PaymentResponse responseDTO)
Looks up the order number for a particular order id from the
PaymentResponse. |
void |
markPaymentAsInvalid(Long orderPaymentId)
Marks a given order payment as invalid.
|
Long applyPaymentToOrder(PaymentResponse responseDTO, PaymentGatewayConfiguration config) throws IllegalArgumentException
responseDTO - the response that came back from the gatewayconfig - values for the payment gatewaymarkPaymentAsInvalid(Long)IllegalArgumentException - if the PaymentResponse.isValid() ()} returns false
or if the order that the PaymentResponse is attempted to be applied to has
already gone through checkoutvoid markPaymentAsInvalid(Long orderPaymentId)
applyPaymentToOrder(PaymentResponse, PaymentGatewayConfiguration)orderPaymentId - the payment ID to mark as invalidString initiateCheckout(Long orderId) throws Exception
PaymentResponse.getOrderId()orderId - the order to check outExceptionString lookupOrderNumberFromOrderId(PaymentResponse responseDTO) throws IllegalArgumentException
PaymentResponse. This
can be used to redirect the user coming from the payment gateway to the order confirmation
page.responseDTO - the response from the gatewayIllegalArgumentException - if the order cannot be found from the
PaymentResponseCopyright © 2021. All rights reserved.