PaymentGateway Interface
Interface for standard payment transaction operations such as voids and refunds.
blng
A gateway implementor uses logic such as paymentGatewayParameter.getTransactionType() == "generateToken" and calls underlying payment transaction functions. Similar logic applies for voids, refunds, and other actions.
The following are methods for PaymentGateway.
-
generateToken(mapOfTransactionParameterById)
Generates a token for a payment method.
-
chargeTransaction(mapOfTransactionParameterById)
Authorize and capture a credit card payment and ACH payment.
-
voidTransaction(mapOfTransactionParameterById)
The Void transaction type can cancel either an original transaction or a transaction that hasn’t been settled.
-
authorizeTransaction(mapOfTransactionParameterById)
Authorizes a credit card payment. To perform a charge transaction, the user must follow the authorization with a capture transaction.
-
refundTransaction(mapOfTransactionParameterById)
Refund a customer for a transaction that wsa successfully settled through the payment gateway.
Generates a token for a payment method.
global Map<String, TransactionResult> generateToken(Map<String, TransactionParameter> mapOfTransactionParameterById)
mapOfTransactionParameterById: Type: Map<String, TransactionParameter> Map of parameter is based on the payment gateway.
Type: Map<String, TransactionResult>
List of Transaction Results : List<TransactionResult>
Authorize and capture a credit card payment and ACH payment.
global Map<String, TransactionResult> chargeTransaction(Map<String, TransactionParameter> mapOfTransactionParameterById)
mapOfTransactionParameterById: Type: Map<String, TransactionParameter> Map of parameter is based on the payment gateway.
Type: Map<String, TransactionResult>
List of Transaction Results : List<TransactionResult>
The Void transaction type can cancel either an original transaction or a transaction that hasn’t been settled.
global Map<String, TransactionResult> voidTransaction(Map<String, TransactionParameter> mapOfTransactionParameterById)
mapOfTransactionParameterById: Type: Map<String, TransactionParameter> Parameter map is based on the payment gateway.
Type: Map<String, TransactionResult>
List of Transaction Results : List<TransactionResult>
Authorizes a credit card payment. To perform a charge transaction, the user must follow the authorization with a capture transaction.
global Map<String, TransactionResult> authorizeTransaction(Map<String, TransactionParameter> mapOfTransactionParameterById)
mapOfTransactionParameterById: Type: Map<String, TransactionParameter> Map of parameter is based on the payment gateway.
Type: Map<String, TransactionResult>
List of Transaction Results : List<TransactionResult>
Refund a customer for a transaction that wsa successfully settled through the payment gateway.
public Map<String, TransactionResult> refundTransaction(Map<String, TransactionParameter> mapOfTransactionParameterById)
mapOfTransactionParameterById: Type: Map<String, TransactionParameter> Map of parameter is based on the payment gateway.
Type: Map<String, TransactionResult>
List of Transaction Results : List<TransactionResult>
The YourGatewayAPI class implements the PaymentGateway, PaymentGateways, and PaymentGatewayStatus interfaces.