Interface PaymentGatewayTransactionService
-
- All Superinterfaces:
PaymentGatewayTypeAware
- All Known Subinterfaces:
PassthroughTransactionService
- All Known Implementing Classes:
DefaultPassthroughTestingTransactionService,DefaultPassthroughTransactionService
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:
- Either to send credit card information directly (server to server) to the gateway to perform the transaction
- Or to confirm an AUTHORIZATION process (some gateways don't handle a token based process through a Transparent Redirect)
- OR handle both (the implementation will do one or the other based on the passed in parameters)
Please check the documentation of the implementing module to determine intended goal.
- Author:
- Elbert Bautista (elbertbautista)
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default PaymentResponseauthorize(PaymentRequest paymentRequest)Responsible for executing aDefaultTransactionTypes.AUTHORIZEtransaction against the payment gateway, based on the providedPaymentRequest, & returning the transaction's results in the form of aPaymentResponse.default PaymentResponseauthorizeAndCapture(PaymentRequest paymentRequest)Responsible for executing aDefaultTransactionTypes.AUTHORIZE_AND_CAPTUREtransaction against the payment gateway, based on the providedPaymentRequest, & returning the transaction's results in the form of aPaymentResponse.default PaymentResponsecapture(PaymentRequest paymentRequest)Responsible for executing aDefaultTransactionTypes.CAPTUREtransaction against the payment gateway, based on the providedPaymentRequest, & returning the transaction's results in the form of aPaymentResponse.default PaymentResponsedetachedCredit(PaymentRequest paymentRequest)Responsible for executing aDefaultTransactionTypes.DETACHED_CREDITtransaction against the payment gateway, based on the providedPaymentRequest, & returning the transaction's results in the form of aPaymentResponse.default StringidentifyParentTransactionReferenceIfExists(Map<String,Object> transactionProperties, Map<String,Object> paymentProperties)default TransactionTypeidentifyTransactionTypeFromTransactionResults(Map<String,Object> transactionProperties, Map<String,Object> paymentProperties)default PaymentResponserefund(PaymentRequest paymentRequest)Responsible for executing aDefaultTransactionTypes.REFUNDtransaction against the payment gateway, based on the providedPaymentRequest, & returning the transaction's results in the form of aPaymentResponse.default PaymentResponsereverseAuthorize(PaymentRequest paymentRequest)Responsible for executing aDefaultTransactionTypes.REVERSE_AUTHtransaction against the payment gateway, based on the providedPaymentRequest, & returning the transaction's results in the form of aPaymentResponse.-
Methods inherited from interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTypeAware
getGatewayType
-
-
-
-
Method Detail
-
authorize
default PaymentResponse authorize(PaymentRequest paymentRequest)
Responsible for executing aDefaultTransactionTypes.AUTHORIZEtransaction against the payment gateway, based on the providedPaymentRequest, & returning the transaction's results in the form of aPaymentResponse.- Parameters:
paymentRequest- The request payload that must be converted into the gateway's expected payload- Returns:
- The results of the authorization transaction
-
capture
default PaymentResponse capture(PaymentRequest paymentRequest)
Responsible for executing aDefaultTransactionTypes.CAPTUREtransaction against the payment gateway, based on the providedPaymentRequest, & returning the transaction's results in the form of aPaymentResponse.- Parameters:
paymentRequest- The request payload that must be converted into the gateway's expected payload- Returns:
- The results of the capture transaction
-
authorizeAndCapture
default PaymentResponse authorizeAndCapture(PaymentRequest paymentRequest)
Responsible for executing aDefaultTransactionTypes.AUTHORIZE_AND_CAPTUREtransaction against the payment gateway, based on the providedPaymentRequest, & returning the transaction's results in the form of aPaymentResponse.- Parameters:
paymentRequest- The request payload that must be converted into the gateway's expected payload- Returns:
- The results of the authorization & capture transaction
-
reverseAuthorize
default PaymentResponse reverseAuthorize(PaymentRequest paymentRequest)
Responsible for executing aDefaultTransactionTypes.REVERSE_AUTHtransaction against the payment gateway, based on the providedPaymentRequest, & returning the transaction's results in the form of aPaymentResponse.- Parameters:
paymentRequest- The request payload that must be converted into the gateway's expected payload- Returns:
- The results of the reverse authorization transaction
-
refund
default PaymentResponse refund(PaymentRequest paymentRequest)
Responsible for executing aDefaultTransactionTypes.REFUNDtransaction against the payment gateway, based on the providedPaymentRequest, & returning the transaction's results in the form of aPaymentResponse.- Parameters:
paymentRequest- The request payload that must be converted into the gateway's expected payload- Returns:
- The results of the refund transaction
-
detachedCredit
default PaymentResponse detachedCredit(PaymentRequest paymentRequest)
Responsible for executing aDefaultTransactionTypes.DETACHED_CREDITtransaction against the payment gateway, based on the providedPaymentRequest, & returning the transaction's results in the form of aPaymentResponse.- Parameters:
paymentRequest- The request payload that must be converted into the gateway's expected payload- Returns:
- The results of the void transaction
-
identifyParentTransactionReferenceIfExists
@Nullable default String identifyParentTransactionReferenceIfExists(Map<String,Object> transactionProperties, Map<String,Object> paymentProperties)
-
-