Finishing a payment
The Intent
result contains a PaymentResult object. Access it using the key PaymentResultInfo.ResultKeys.Transaction
.
Response Result Codes
Every returning intent will pass back a result code which will provide specific info on the result of the transaction.
Usage
After a successful or failed payment from YocoSDK.charge()
flow an Intent
result will be returned, containing info related to the transaction.
The standard way of handling an intent result:
Activity Results API
You can handle the result of a payment by using the Activity Results API with androidx.
Required Dependencies:
Instantiate the result contract, which may be passed to the YocoSDK
as the result. There is no need to use the request code, as we tie
the contract to the charge()
implementation.