public interface PaymentGatewayCheckoutService
The default implementation of this interface is represented in the core Broadleaf framework at
oorg.broadleafcommerce.core.payment.service.DefaultPaymentGatewayCheckoutService. 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.
These service methods are usually invoked from the controller that listens to the endpoint hit by the external payment
provider (which should be a subclass of
|Modifier and Type||Method and Description|
Initiates the checkout process for a given orderId.
Looks up the order number for a particular order id from the
Marks a given order payment as invalid.
Long applyPaymentToOrder(PaymentResponseDTO responseDTO, PaymentGatewayConfiguration config) throws IllegalArgumentException
responseDTO- the response that came back from the gateway
config- values for the payment gateway
IllegalArgumentException- if the
PaymentResponseDTO#getValid()returns false or if the order that the
PaymentResponseDTOis attempted to be applied to has already gone through checkout
void markPaymentAsInvalid(Long orderPaymentId)
orderPaymentId- the payment ID to mark as invalid
orderId- the order to check out
String lookupOrderNumberFromOrderId(PaymentResponseDTO responseDTO) throws IllegalArgumentException
PaymentResponseDTO. This can be used to redirect the user coming from the payment gateway to the order confirmation page.
responseDTO- the response from the gateway
IllegalArgumentException- if the order cannot be found from the
Copyright © 2019. All rights reserved.