public class DefaultPassthroughTransactionService extends Object implements PassthroughTransactionService
| Constructor and Description |
|---|
DefaultPassthroughTransactionService() |
| Modifier and Type | Method and Description |
|---|---|
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. |
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. |
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. |
String |
getGatewayType()
Each payment module should have a unique implementation of
PaymentGatewayType with
only a single type. |
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. |
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. |
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. |
public DefaultPassthroughTransactionService()
public PaymentResponse authorize(PaymentRequest paymentRequest) throws PaymentException
PaymentGatewayTransactionServiceDefaultTransactionTypes.AUTHORIZE transaction against the
payment gateway, based on the provided PaymentRequest, & returning the transaction's
results in the form of a PaymentResponse.authorize in interface PaymentGatewayTransactionServicepaymentRequest - The request payload that must be converted into the gateway's expected
payloadPaymentExceptionpublic PaymentResponse capture(PaymentRequest paymentRequest) throws PaymentException
PaymentGatewayTransactionServiceDefaultTransactionTypes.CAPTURE transaction against the
payment gateway, based on the provided PaymentRequest, & returning the transaction's
results in the form of a PaymentResponse.capture in interface PaymentGatewayTransactionServicepaymentRequest - The request payload that must be converted into the gateway's expected
payloadPaymentExceptionpublic PaymentResponse authorizeAndCapture(PaymentRequest paymentRequest) throws PaymentException
PaymentGatewayTransactionServiceDefaultTransactionTypes.AUTHORIZE_AND_CAPTURE transaction
against the payment gateway, based on the provided PaymentRequest, & returning the
transaction's results in the form of a PaymentResponse.authorizeAndCapture in interface PaymentGatewayTransactionServicepaymentRequest - The request payload that must be converted into the gateway's expected
payloadPaymentExceptionpublic PaymentResponse reverseAuthorize(PaymentRequest paymentRequest) throws PaymentException
PaymentGatewayTransactionServiceDefaultTransactionTypes.REVERSE_AUTH transaction against
the payment gateway, based on the provided PaymentRequest, & returning the
transaction's results in the form of a PaymentResponse.reverseAuthorize in interface PaymentGatewayTransactionServicepaymentRequest - The request payload that must be converted into the gateway's expected
payloadPaymentExceptionpublic PaymentResponse refund(PaymentRequest paymentRequest) throws PaymentException
PaymentGatewayTransactionServiceDefaultTransactionTypes.REFUND transaction against the
payment gateway, based on the provided PaymentRequest, & returning the transaction's
results in the form of a PaymentResponse.refund in interface PaymentGatewayTransactionServicepaymentRequest - The request payload that must be converted into the gateway's expected
payloadPaymentExceptionpublic PaymentResponse voidPayment(PaymentRequest paymentRequest) throws PaymentException
PaymentGatewayTransactionServiceDefaultTransactionTypes.VOID transaction against the
payment gateway, based on the provided PaymentRequest, & returning the transaction's
results in the form of a PaymentResponse.voidPayment in interface PaymentGatewayTransactionServicepaymentRequest - The request payload that must be converted into the gateway's expected
payloadPaymentExceptionpublic String getGatewayType()
PaymentGatewayTypeAwarePaymentGatewayType with
only a single type. For instance, the Braintree module would have a
'BraintreePaymentGatewayType' implementation which defines its gateway type key.getGatewayType in interface PaymentGatewayTypeAwarePaymentGatewayType related to implementing resourceCopyright © 2021. All rights reserved.