Show UI
Usage#
- iOS
- Android
- Flutter
Finally we just call as below to start new transaction
Handle payment result#
After payment, the PaymentActivity will be return the result in onActivityResult with the following data:
requestCode:PaymentActivity.RC_PAYMENTresultCode:
PaymentActivity.RESULT_CANCELED: when use cancels payment process: pressCancelbutton, ...PaymentActivity.RESULT_SUCCEEDED: when payment process is succeededPaymentActivity.RESULT_FAILED: when payment process is failed or activity is stopped and received aActivity.RESULT_CANCELEDfrom system.
data: a nullablePaymentResultobject which depends on result
Notes:
- For using
VNPayEWalletmethod:
- Download sdkwallet_release_x_x.x.x.aar file of library
- Put it in libs folder
- Import sdkwallet library in build.gradle file
- Add
tools:replace="label,allowBackup,android:theme"to<application>tag in AndroidManifest.xml file
Note: Currently, sdkwallet has only allowed running on the emulator. Please use real device for testing this feature.
After generating paymentUIRequest, we pass it through payWith:request:delegate function for getting UI
Handle payment result#
We need conform protocol AIOPaymentUIDelegate for getting result like below
Note#
In case we don't set an online method, we will process payment by using only loyalty method. If we don't set both of methods, an error will occur.
For using
VNPayEWalletmethod:For more details and resources, please contact the terra team.
For using
VNPayQRReversalmethod or using download QRCode function ofVNPayQRGateway+VNPayQRMMSpages, we need add Photo and Camera permissions in Info.plist file.Disable App transport security settings if needed
After generating paymentUIRequest
Handle payment result#
Notes For using VNPayEWallet method: Please follow this Installation guide for Flutter.