The PhoneGap plugin will be deprecated in favour of a new Cordova / PhoneGap plugin which is compatible with our Mobile SDK v2.
As promised in my previous post we’ve got all those cross-platform developers out there covered too. Just a few days ago we released a first version of the Android SDK PhoneGap plugin. In this post I want to highlight the most important steps for getting started and making sure your project will be able to accept payments.
Compatibility We’ve tested the plugin itself with PhoneGap 2.6 and 2.7. You should be fine running the plugin with these versions.
Prerequisites Please make sure to read my previous blog post in order to understand and execute the following 4 steps:
- Getting credentials for your project
- Adding the PayPal Android SDK lib to your project
- Requesting the right permissions
- Adding the required Service and Activities Once you’ve got those 4 steps completed we can start working with our plugin.
Obtaining and setting up the plugin The plugin can be obtained
over at GitHub. Please make sure to move the contained files to the following paths: *
And add an entry for the plugin in your
config.xml (which can be found at
Making payments In order to trigger a payment your UI should contain some kind of trigger like a button. Therefore we’re going to add the following button:
Now define the following function being triggered by the button: If you’re interested in what else you’re enabled to do with the plugin already: Have a look at the code of the
<a href="https://github.com/paypal/PayPal-Android-SDK-PhoneGap/blob/master/PayPalMobilePGPlugin.js" target="_blank">PayPalMobilePGPlugin.js</a>!
That’s it This is all you need to get started. The plugin wraps away all the other code and makes accepting payments as smooth as possible. We’re going to add more and more functionality over time to make sure you can make the most out of your (web-)app.
- Design Thinking: Out of the Classroom, Into the Fire
- How WooCommerce and Developer Agencies Optimize Payments for Small Businesses with PayPal
- New REST API Feature: Setting a Receiver for Payments
- PayPal is Now Available Through WooCommerce 2.6 Onboarding Wizard
Connect with us!
- April 2017
- March 2017
- January 2017
- December 2016
- October 2016
- September 2016
- July 2016
- May 2016
- March 2016
- November 2015
- September 2015
- August 2015
- June 2015
- April 2015
- March 2015
- November 2014
- October 2014
- August 2014
- July 2014
- March 2014
- February 2014
- January 2014
- December 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013