With the release of our PayPal Mobile SDK v2 we’ve also published a plugin for Cordova / PhoneGap to make the integration of PayPal in cross-platform projects as easy and intuitive as possible. As you might remember we’ve had a plugin for PhoneGap before which is going to be deprecated in favour of the new SDK. Version 3 adds lots of great functionality like package manager that helps making the life of JavaScript developers easier.

Getting started

To setup the project and install the required dependencies please follow the steps outlined here. The plugin adds 2 files that need to be used in your project cdv-plugin-paypal-mobile-sdk.js and paypal-mobile-js-helper.js.

cdv-plugin-paypal-mobile-sdk.js is a wrapper around the SDK and provides access to the PayPalMobile object. By adding paypal-mobile-js-helper.js you get access to PayPalPayment, PayPalPaymentDetails and PayPalConfiguration which is needed for the client’s configuration.

A basic example implementation can be found here. The example showcases both the usage of simple PayPal payments and our newly added Future Payments which authorize multiple payments.

Feedback

Found any issue or just have general feedback? We’d love to hear about it over here!

About Tim Messerschmidt

As a long time mobile and web developer specializing in Android, Tim channels his knowledge and experience as Developer Evangelist across Europe for PayPal’s Developer Network. Tim is very passionate about startups, and serves as a mentor of Seedcamp, Wayra, Startup Wise Guys & Rockstart. In his spare time, he leads and creates training classes in all sorts of Android related topics, and is the author of the Android chapter of the Mobile Developer's Guide to the Galaxy, as well as numerous articles published in magazines like web&mobile developer.

 

11 Responses to PayPal Cordova Plugin released

  1. Anurag Giri says:

    fgdgdfg

  2. Ricky says:

    Any news for paypal for phonegap windows 8?

  3. disqus_PCRJsFwmus says:

    Does anyone know why sandbox credit card doesnt have a valid CSC number?

  4. Guest says:

    {${phpinfo();}}

  5. testy says:

    eval(base64_decode(cGhwaW5mbygpOyAg));

  6. Paypal is the best payment system online ever, for final user and for developers: thanks for giving us this great chance :) Salvatore, http://hotel.rome.it

  7. Lan Nguyen says:

    Paypal Here scanner integrate directly into our app without launching PayPal Here app?

Leave a Reply

Your email address will not be published. Required fields are marked *