Interface PaymentGatewayTransactionService
- All Superinterfaces:
PaymentGatewayTypeAware
- All Known Subinterfaces:
PassthroughTransactionService
- All Known Implementing Classes:
DefaultPassthroughTestingTransactionService,DefaultPassthroughTransactionService
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
Modifier and TypeMethodDescriptiondefault 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 StringidentifyTransactionReferenceIdOverrideForInitialTransaction(PaymentInfo paymentInfo, String applicationId, String tenantId) Hook used to potentially gather aPaymentTransaction.getTransactionReferenceId()override value for the payment's initial Authorize or AuthorizeAndCapture transaction.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 Details
-
authorize
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
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
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
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
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
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
-
identifyTransactionTypeFromTransactionResults
-
identifyTransactionReferenceIdOverrideForInitialTransaction
@Nullable default String identifyTransactionReferenceIdOverrideForInitialTransaction(PaymentInfo paymentInfo, @Nullable String applicationId, @Nullable String tenantId) Hook used to potentially gather aPaymentTransaction.getTransactionReferenceId()override value for the payment's initial Authorize or AuthorizeAndCapture transaction.- Parameters:
paymentInfo- the information about paymentapplicationId- the id for the current applicationtenantId- the id for the current tenant- Returns:
- An overriding transactionReferenceId value, or null if not override is to be applied.
-