public interface PaymentGatewayTransactionService extends PaymentGatewayTypeAware
This is an interface that provides the basic functions to create billable credit card transactions
The intention of these methods are to make a server to server API call. Depending on the gateway implementation, the overall goal and meaning of the method may vary. For example, a module can implement the AUTHORIZE method:
Please check the documentation of the implementing module to determine intended goal.
Note: in the case where a gateway doesn't support confirming the transaction before it is
submitted (i.e. paymentGatewayConfigurationService.completeCheckoutOnCallback() == true) The
PaymentGatewayWebResponseService
will handle translation of the final transaction
response from the gateway. There is no need to re-call this service if the gateway doesn't
support confirming the transaction.
PaymentGatewayWebResponseService}
Modifier and Type | Method and Description |
---|---|
default PaymentResponse |
authorize(PaymentRequest paymentRequest)
Responsible for executing a
DefaultTransactionTypes.AUTHORIZE transaction against the
payment gateway, based on the provided PaymentRequest , & returning the transaction's
results in the form of a PaymentResponse . |
default PaymentResponse |
authorizeAndCapture(PaymentRequest paymentRequest)
Responsible for executing a
DefaultTransactionTypes.AUTHORIZE_AND_CAPTURE transaction
against the payment gateway, based on the provided PaymentRequest , & returning the
transaction's results in the form of a PaymentResponse . |
default PaymentResponse |
capture(PaymentRequest paymentRequest)
Responsible for executing a
DefaultTransactionTypes.CAPTURE transaction against the
payment gateway, based on the provided PaymentRequest , & returning the transaction's
results in the form of a PaymentResponse . |
default PaymentResponse |
refund(PaymentRequest paymentRequest)
Responsible for executing a
DefaultTransactionTypes.REFUND transaction against the
payment gateway, based on the provided PaymentRequest , & returning the transaction's
results in the form of a PaymentResponse . |
default PaymentResponse |
reverseAuthorize(PaymentRequest paymentRequest)
Responsible for executing a
DefaultTransactionTypes.REVERSE_AUTH transaction against
the payment gateway, based on the provided PaymentRequest , & returning the
transaction's results in the form of a PaymentResponse . |
default PaymentResponse |
voidPayment(PaymentRequest paymentRequest)
Responsible for executing a
DefaultTransactionTypes.VOID transaction against the
payment gateway, based on the provided PaymentRequest , & returning the transaction's
results in the form of a PaymentResponse . |
getGatewayType
default PaymentResponse authorize(PaymentRequest paymentRequest)
DefaultTransactionTypes.AUTHORIZE
transaction against the
payment gateway, based on the provided PaymentRequest
, & returning the transaction's
results in the form of a PaymentResponse
.paymentRequest
- The request payload that must be converted into the gateway's expected
payloaddefault PaymentResponse capture(PaymentRequest paymentRequest)
DefaultTransactionTypes.CAPTURE
transaction against the
payment gateway, based on the provided PaymentRequest
, & returning the transaction's
results in the form of a PaymentResponse
.paymentRequest
- The request payload that must be converted into the gateway's expected
payloaddefault PaymentResponse authorizeAndCapture(PaymentRequest paymentRequest)
DefaultTransactionTypes.AUTHORIZE_AND_CAPTURE
transaction
against the payment gateway, based on the provided PaymentRequest
, & returning the
transaction's results in the form of a PaymentResponse
.paymentRequest
- The request payload that must be converted into the gateway's expected
payloaddefault PaymentResponse reverseAuthorize(PaymentRequest paymentRequest)
DefaultTransactionTypes.REVERSE_AUTH
transaction against
the payment gateway, based on the provided PaymentRequest
, & returning the
transaction's results in the form of a PaymentResponse
.paymentRequest
- The request payload that must be converted into the gateway's expected
payloaddefault PaymentResponse refund(PaymentRequest paymentRequest)
DefaultTransactionTypes.REFUND
transaction against the
payment gateway, based on the provided PaymentRequest
, & returning the transaction's
results in the form of a PaymentResponse
.paymentRequest
- The request payload that must be converted into the gateway's expected
payloaddefault PaymentResponse voidPayment(PaymentRequest paymentRequest)
DefaultTransactionTypes.VOID
transaction against the
payment gateway, based on the provided PaymentRequest
, & returning the transaction's
results in the form of a PaymentResponse
.paymentRequest
- The request payload that must be converted into the gateway's expected
payloadCopyright © 2021. All rights reserved.