// See PayPalMobilePGPlugin.js for better understanding
// set environment you want to use
window.plugins.PayPalMobile.setEnvironment("PayPalEnvironmentNoNetwork");
// define a callback when payment has been completed
var completionCallback = function(proofOfPayment) {
// TODO: Send this result to the server for verification;
// see "https://developer.paypal.com/webapps/developer/docs/integration/mobile/verify-mobile-payment/"
for details.
console.log("Proof of payment: " + JSON.stringify(proofOfPayment));
}
// define a callback if payment has been canceled
var cancelCallback = function(reason) {
console.log("Payment cancelled: " + reason);
}
// launch UI, the PayPal UI will be present on screen until user cancels it or payment completed
window.plugins.PayPalMobile.presentPaymentUI("YOUR_CLIENT_ID", "YOUR_PAYPAL_EMAIL_ADDRESS",
"[email protected]", ["1.99", "USD", "Awesome saws"], completionCallback, cancelCallback);
A simple paypal phonegap plugin only for android and ios.
For any questions or information check out: http://www.technextit.com
Developer (Android): Eaiman Shoshi
Developer (iOS): Ashraful Prium
Email: [email protected]
Feel free to use it in your project. And let me know about any issue about this plugin.
Technext