PaymentManager

Manages payment related operations.

Properties

Link copied to clipboard

Determines the appropriate oauth token for any given query. This can be either the access token or the user token. Default behavior is to return the user token if available and fall back to the access token if not. Order of precedence:

Link copied to clipboard
Link copied to clipboard

Used to control manager's synchronous state. Default is asynchronous

Link copied to clipboard

Token that is used a single time. Once used, it should be set to null

Functions

Link copied to clipboard
fun auth(payment: Payment, response: Response<Transaction>? = null)

Performs an authorization for the given payment.

Link copied to clipboard
fun capture(transaction: Transaction, response: Response<Transaction>? = null)

Performs a capture for the given transaction.

Link copied to clipboard
fun getAvailableHMACToken(key: String, timeStamp: String?, body: String): String

Calcualtes the HMAC token and appends it to the appropriate token for more security

Link copied to clipboard

Gets the Google Pay request configuration from the first available payment gateway.

Link copied to clipboard
fun retrieveTransaction(transactionId: String, response: Response<Transaction>? = null)

Retrieves a previous transaction from the remote server

Link copied to clipboard
fun sale(payment: Payment, response: Response<Transaction>? = null)

Performs a sale for the given payment.

Link copied to clipboard
fun void(transaction: Transaction, response: Response<Transaction>? = null)

Voids the given transaction.