Integrator Transactions Lookup
When creating a charge with YocoSDK.charge()
, 3rd party integrators can pass an optional receiptNumber
in PaymentParameters
. The receiptNumber
should be unique and is up to integrators to store.
The receiptNumber
allows for lookup if a transaction handle is lost, due to e.g. application exiting prematurely.
Parameters
receiptNumber: String
- A unique string set when creating a charge
completionHandler: ((resultCode: Int, result: List<PaymentResult>?, errorMessage: String?) -> Unit)?
- lookup completion handler
Usage
import com.yoco.payments.sdk.YocoSDK
YocoSDK.getIntegratorTransactions(receiptNumber) { resultCode: Int, result: List<PaymentResult>?, errorMessage: String? ->
// resultCode - PaymentResultInfo.ResultCode
// result - collection of PaymentResult, null if no transactions found or lookup fails
// errorMessage - error description string
}