Show UI
#
Usage- iOS
- Android
- Flutter
Finally we just call as below to start new transaction
#
Handle payment resultAfter payment, the PaymentActivity
will be return the result in onActivityResult
with the following data:
requestCode
:PaymentActivity.RC_PAYMENT
resultCode
:
PaymentActivity.RESULT_CANCELED
: when use cancels payment process: pressCancel
button, ...PaymentActivity.RESULT_SUCCEEDED
: when payment process is succeededPaymentActivity.RESULT_FAILED
: when payment process is failed or activity is stopped and received aActivity.RESULT_CANCELED
from system.
data
: a nullablePaymentResult
object which depends on result
Notes:
- For using
VNPayEWallet
method:
- 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 resultWe need conform protocol AIOPaymentUIDelegate
for getting result like below
#
NoteIn 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
VNPayEWallet
method:For more details and resources, please contact the terra team.
For using
VNPayQRReversal
method or using download QRCode function ofVNPayQRGateway
+VNPayQRMMS
pages, we need add Photo and Camera permissions in Info.plist file.Disable App transport security settings if needed
After generating paymentUIRequest
#
Handle payment resultNotes For using VNPayEWallet
method: Please follow this Installation guide for Flutter.