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
PaymentGatewayTransactionService
DefaultTransactionTypes.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 PaymentGatewayTransactionService
paymentRequest
- The request payload that must be converted into the gateway's expected
payloadPaymentException
public PaymentResponse capture(PaymentRequest paymentRequest) throws PaymentException
PaymentGatewayTransactionService
DefaultTransactionTypes.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 PaymentGatewayTransactionService
paymentRequest
- The request payload that must be converted into the gateway's expected
payloadPaymentException
public PaymentResponse authorizeAndCapture(PaymentRequest paymentRequest) throws PaymentException
PaymentGatewayTransactionService
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
.authorizeAndCapture
in interface PaymentGatewayTransactionService
paymentRequest
- The request payload that must be converted into the gateway's expected
payloadPaymentException
public PaymentResponse reverseAuthorize(PaymentRequest paymentRequest) throws PaymentException
PaymentGatewayTransactionService
DefaultTransactionTypes.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 PaymentGatewayTransactionService
paymentRequest
- The request payload that must be converted into the gateway's expected
payloadPaymentException
public PaymentResponse refund(PaymentRequest paymentRequest) throws PaymentException
PaymentGatewayTransactionService
DefaultTransactionTypes.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 PaymentGatewayTransactionService
paymentRequest
- The request payload that must be converted into the gateway's expected
payloadPaymentException
public PaymentResponse voidPayment(PaymentRequest paymentRequest) throws PaymentException
PaymentGatewayTransactionService
DefaultTransactionTypes.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 PaymentGatewayTransactionService
paymentRequest
- The request payload that must be converted into the gateway's expected
payloadPaymentException
public String getGatewayType()
PaymentGatewayTypeAware
PaymentGatewayType
with
only a single type. For instance, the Braintree module would have a
'BraintreePaymentGatewayType' implementation which defines its gateway type key.getGatewayType
in interface PaymentGatewayTypeAware
PaymentGatewayType
related to implementing resourceCopyright © 2021. All rights reserved.