VivaPayments / API

Index of Viva Wallet open source projects on GitHub.
139 stars 162 forks source link

Viva terminal app can not be opened with URI scheme by Android app. #2513

Closed itsouchlos closed 4 months ago

itsouchlos commented 4 months ago

I have an ionic mobile app that uses Capacitor. I am trying to implement a feature that, on the click of a button, my app opens the Viva Terminal Demo app and passes the required URI parameters so that, after the payment is completed on the Viva Terminal Demo app, a response will be sent to my app to continue the operations. The feature is to only be implemented on Android devices.

I am using the Capacitor AppLauncher API to launch the app. When running the code below, the app opens normally: var url = 'com.vivawallet.spoc.payapp.demo'; await AppLauncher.openUrl({ url: url });

However, running the following code fails. No error is returned but the Viva Terminal Demo app is not launched. var url = 'com.vivawallet.spoc.payapp.demo://pay/v1?appId=com.myapp.app&action=sale&amount=1200&callback=mycallback://result'; await AppLauncher.openUrl({ url: url });

Upon looking into the issue, it seems like the AndroidManifest of the Viva Terminal Demo app should be configured to accept requests with the proper URI scheme. Is the app's AndroiManifest file configured correctly or is there something wrong with the url scheme I am passing?

For the record, I also tried the following schemes:

com.vivawallet.spoc.payapp.demo:// com.vivawallet.spoc.payapp.demo://sale com.vivawallet.spoc.payapp.demo://v1 com.vivawallet.spoc.payapp.demo://?action=sale com.vivawallet.spoc.payapp.demo://?action=sale&amount=1200 com.vivawallet.spoc.payapp.demo://pay/v1?action=sale com.vivawallet.spoc.payapp.demo://pay/v1?action=sale&amount=1200

VivaWalletCustomerSupport commented 4 months ago

Hello @itsouchlos,

Thank you for your message and apologies for the delay. We currently investigating your case. We would recommend checking the guide below: https://developer.viva.com/apis-for-point-of-sale/card-terminal-apps/android-app/sale/

Kind regards, Viva Support Team

VivaWalletCustomerSupport commented 4 months ago

Hello @itsouchlos

We just wanted to follow up on the reply we sent. We were simply wondering if you read our response.

In any case this ticket will remain active for at least 24 hours, so that you can come back if you wish.

However, if you have any questions, please don't hesitate to reply here and we'd be happy to help!

Kind regards, Viva E-commerce Support Team

VivaWalletCustomerSupport commented 4 months ago

Hello @itsouchlos,

This ticket will close for now. Please don't hesitate to raise a new ticket if you need further assistance.

Kind regards, Viva E-commerce Support Team