-1

Currently I am working on a Project which is implemented in Ionic 1 and AngularJs.

Now we are working to integrate it with BHIM UPI to perform In-App payment. I think we need to install IONIC Native Web Intent plugin in order to make web intent call to BHIM.

But I am fairly new to angularJs and Ionic. I have seen some of the questions related to this but those are implemented in Ionic3 and latest versions.

  1. UPI Deeplinking from IONIC to GooglePay does not work as expected
  2. DEEPLINK_HOST in ionic deeplink
  3. Deeplinking - Opening an Ionic App through another Ionic App

I have tried to achieve this by making Web Intent calls with help of this https://www.npmjs.com/package/@ionic-native/web-intent?activeTab=readme but with no luck. It's giving Error message like below

ionic.bundle.min.js:150 Error: [$injector:unpr] http://errors.angularjs.org/1.5.3/$injector/unpr?p0=webIntentProvider%20%3C-%20webIntent%20%3C-%20PaymentComponent%20%3C-%20PaymentComponent
    at http://localhost:8100/js/ionic.bundle.min.js:40:416
    at http://localhost:8100/js/ionic.bundle.min.js:77:7
    at Object.d [as get] (http://localhost:8100/js/ionic.bundle.min.js:74:270)

EDIT :

I want to open BHIM UPI app from my Ionic App and able return success or failure status of transaction.

Any help or directions to achieve this will be highly appreciated.

Ganesh
  • 5,808
  • 2
  • 21
  • 41

1 Answers1

1

There is no 'webIntentProvider' exists in ionic providers.

You've to remove 'webIntent' from your controllers injections. And use below code to open existing UPIs available in your mobile.

window.plugins.intentShim.startActivity(
                    {
                        action: window.plugins.intentShim.ACTION_VIEW,
                        url: urlIntent
                    },
                    function () { },
                    function () {
                        alert('Failed to open URL via Android Intent')
                    }
                );

It'll show all available UPI providers which are installed in your mobile. Please go through documentation Deeplinking UPI for more details.

Cross check your package.json & confilg.xml, whether you installed above plugin in your app or not.

Anvesh P
  • 299
  • 2
  • 8
  • thank you for your Answer and time, now i am able open the UPI related apps on the mobile but not redirecting directly to the selected BHIM. – Ganesh May 20 '19 at 08:37
  • Thank you for your time and suggestions, now i am able solve this with the same API which i have tried previously https://www.npmjs.com/package/@ionic-native/web-intent?activeTab=readme – Ganesh May 22 '19 at 09:18
  • Above code says "intentShim" does not exist on type Plugins. I want to open all the UPI apps installed in phone through my ionic app please help me. I am using Ionic v4. – sachin rathod Jan 17 '20 at 10:48