How to integrate Paypal Cordova Plugin in IONIC Framework

Hi Guys,

I want to integrate Paypal Cordova Plugin with IONIC Framework.

I already run below command inside ionic app.
cordova plugin add

After this step should i need to follow below steps also ?

  1. Run cordova platform add ios or/and cordova platform add android.
  2. For iOS, open the Xcode project in the platforms/ios folder and add the PayPalMobile folder from step 1.
  3. For Android, copy the libs folder from step 2 to the libs folder in platforms/android.
  4. Run cordova build to build the projects for all of the platforms.

Please help me regarding this…



Not really a question or issue with ionic…

You may have better luck getting help if you ask this on Stackoverflow

Thanks for the reply…Please browse this link
You can see i need to replace www/js/index.js file inside Cordova Structure…

But IONIC is having js/app.js file.where i need to replace this functionality and which file i need to add inside IONIC framework…


Hi nirav12, have you solved ?
I have the same problem.


Yes. I am able to integrate paypal in my app without installing paypal cordova plugin.

You can use Inappbrowser (
instead of paypal cordova plugin.

We used paypal adaptive payment so integrating adaptive payment with inappbrowser you can use below link.



thanks, you have an example?
How you are using callback functions?

I really need some help here. Does anybody implemented Paypal

Hi Nirav,
How you pass invoice data (collection of items to inapp browser)


1 Like

How you solved @suhaschitade? And what is the problem with paypal/PayPal-Cordova-Plugin?


ive implemented the plugin in a current app. Whats the problem ? . How can I help you

Hi danicomas,
When I was integrating paypal plugin there was no support available for invoice data.
However recently I have received notification from paypal plugin team that they have introduced feature of invoice data in plugin.

So take latest of plugin and integrate with app. Its cool


1 Like

Nice @suhaschitade ! Thanks

Please, anybody can help me? I’m trying to integrate Paypal Cordova with no luck.
I’ve linked inside my index.html the index.js and paypal-mobile-js-helper.js.

I’ve tried to load using:
or execute directly:
PayPalMobile.renderSinglePaymentUI(app.createPayment(), app.onSuccesfulPayment,

But I always get this error:
ReferenceError: PayPalApp is not defined

Please can you post a pastebin of your code for everyone ?

Here is the code

Pastebin no longer available.

Added a gist

Hi, I’m pretty new to angular. How do you pass in the shopSettings object?

shopSettings is a constant
for further informations

Hi! Excuse me, I’m newbie in angular and ionic, how you connect paypal plagin? I made instructions, copy your code, but i got an error: PayPalMobile is not defined in browser’s console. I’ve connected paypal helper via < script src="…/…/plugins/com.paypal.cordova.mobilesdk/www/paypal-mobile-js-helper.js"></ script> , but it seems, like i missed smth else. can you help me?