Class DefaultPassthroughTransactionService
- java.lang.Object
-
- com.broadleafcommerce.paymentgateway.service.passthrough.DefaultPassthroughTransactionService
-
- All Implemented Interfaces:
PassthroughTransactionService
,PaymentGatewayTransactionService
,PaymentGatewayTypeAware
public class DefaultPassthroughTransactionService extends Object implements PassthroughTransactionService
-
-
Constructor Summary
Constructors Constructor Description DefaultPassthroughTransactionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PaymentResponse
authorize(PaymentRequest paymentRequest)
Responsible for executing aDefaultTransactionTypes.AUTHORIZE
transaction against the payment gateway, based on the providedPaymentRequest
, & returning the transaction's results in the form of aPaymentResponse
.PaymentResponse
authorizeAndCapture(PaymentRequest paymentRequest)
Responsible for executing aDefaultTransactionTypes.AUTHORIZE_AND_CAPTURE
transaction against the payment gateway, based on the providedPaymentRequest
, & returning the transaction's results in the form of aPaymentResponse
.PaymentResponse
capture(PaymentRequest paymentRequest)
Responsible for executing aDefaultTransactionTypes.CAPTURE
transaction against the payment gateway, based on the providedPaymentRequest
, & returning the transaction's results in the form of aPaymentResponse
.PaymentResponse
detachedCredit(PaymentRequest paymentRequest)
Responsible for executing aDefaultTransactionTypes.DETACHED_CREDIT
transaction against the payment gateway, based on the providedPaymentRequest
, & returning the transaction's results in the form of aPaymentResponse
.String
getGatewayType()
Each payment module should have a unique implementation ofPaymentGatewayType
with only a single type.PaymentResponse
refund(PaymentRequest paymentRequest)
Responsible for executing aDefaultTransactionTypes.REFUND
transaction against the payment gateway, based on the providedPaymentRequest
, & returning the transaction's results in the form of aPaymentResponse
.PaymentResponse
reverseAuthorize(PaymentRequest paymentRequest)
Responsible for executing aDefaultTransactionTypes.REVERSE_AUTH
transaction against the payment gateway, based on the providedPaymentRequest
, & returning the transaction's results in the form of aPaymentResponse
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
identifyParentTransactionReferenceIfExists, identifyTransactionTypeFromTransactionResults
-
-
-
-
Method Detail
-
authorize
public PaymentResponse authorize(PaymentRequest paymentRequest) throws PaymentException
Description copied from interface:PaymentGatewayTransactionService
Responsible for executing aDefaultTransactionTypes.AUTHORIZE
transaction against the payment gateway, based on the providedPaymentRequest
, & returning the transaction's results in the form of aPaymentResponse
.- Specified by:
authorize
in interfacePaymentGatewayTransactionService
- Parameters:
paymentRequest
- The request payload that must be converted into the gateway's expected payload- Returns:
- The results of the authorization transaction
- Throws:
PaymentException
-
capture
public PaymentResponse capture(PaymentRequest paymentRequest) throws PaymentException
Description copied from interface:PaymentGatewayTransactionService
Responsible for executing aDefaultTransactionTypes.CAPTURE
transaction against the payment gateway, based on the providedPaymentRequest
, & returning the transaction's results in the form of aPaymentResponse
.- Specified by:
capture
in interfacePaymentGatewayTransactionService
- Parameters:
paymentRequest
- The request payload that must be converted into the gateway's expected payload- Returns:
- The results of the capture transaction
- Throws:
PaymentException
-
authorizeAndCapture
public PaymentResponse authorizeAndCapture(PaymentRequest paymentRequest) throws PaymentException
Description copied from interface:PaymentGatewayTransactionService
Responsible for executing aDefaultTransactionTypes.AUTHORIZE_AND_CAPTURE
transaction against the payment gateway, based on the providedPaymentRequest
, & returning the transaction's results in the form of aPaymentResponse
.- Specified by:
authorizeAndCapture
in interfacePaymentGatewayTransactionService
- Parameters:
paymentRequest
- The request payload that must be converted into the gateway's expected payload- Returns:
- The results of the authorization & capture transaction
- Throws:
PaymentException
-
reverseAuthorize
public PaymentResponse reverseAuthorize(PaymentRequest paymentRequest) throws PaymentException
Description copied from interface:PaymentGatewayTransactionService
Responsible for executing aDefaultTransactionTypes.REVERSE_AUTH
transaction against the payment gateway, based on the providedPaymentRequest
, & returning the transaction's results in the form of aPaymentResponse
.- Specified by:
reverseAuthorize
in interfacePaymentGatewayTransactionService
- Parameters:
paymentRequest
- The request payload that must be converted into the gateway's expected payload- Returns:
- The results of the reverse authorization transaction
- Throws:
PaymentException
-
refund
public PaymentResponse refund(PaymentRequest paymentRequest) throws PaymentException
Description copied from interface:PaymentGatewayTransactionService
Responsible for executing aDefaultTransactionTypes.REFUND
transaction against the payment gateway, based on the providedPaymentRequest
, & returning the transaction's results in the form of aPaymentResponse
.- Specified by:
refund
in interfacePaymentGatewayTransactionService
- Parameters:
paymentRequest
- The request payload that must be converted into the gateway's expected payload- Returns:
- The results of the refund transaction
- Throws:
PaymentException
-
detachedCredit
public PaymentResponse detachedCredit(PaymentRequest paymentRequest) throws PaymentException
Description copied from interface:PaymentGatewayTransactionService
Responsible for executing aDefaultTransactionTypes.DETACHED_CREDIT
transaction against the payment gateway, based on the providedPaymentRequest
, & returning the transaction's results in the form of aPaymentResponse
.- Specified by:
detachedCredit
in interfacePaymentGatewayTransactionService
- Parameters:
paymentRequest
- The request payload that must be converted into the gateway's expected payload- Returns:
- The results of the void transaction
- Throws:
PaymentException
-
getGatewayType
public String getGatewayType()
Description copied from interface:PaymentGatewayTypeAware
Each payment module should have a unique implementation ofPaymentGatewayType
with only a single type. For instance, the Braintree module would have a 'BraintreePaymentGatewayType' implementation which defines its gateway type key.- Specified by:
getGatewayType
in interfacePaymentGatewayTypeAware
- Returns:
- The
PaymentGatewayType
related to implementing resource
-
-