Support Android & iOS.
tns plugin add nativescript-paypal-checkout
In the demo you will find a test token to test quickly
import { PaypalCheckout, PaypalOptions } from 'nativescript-paypal-checkout';
private paypalCheckout: PaypalCheckout;
this.paypalCheckout = new PaypalCheckout();
let options: PaypalOptions = {
token: "TOKEN", // The token is obtained from the server
amount: "10",
currencyCode: "USD"
};
this.paypalCheckout.paypalRequest(options).then(
(nonce) => {
console.log("Token nonce: " + nonce);
}, (error) => {
console.log(error);
}
);
Create token Server-Side : https://developers.braintreepayments.com/start/hello-server/php#generate-a-client-token
More references: https://developers.braintreepayments.com/guides/paypal/checkout-with-paypal/android/v2
Server-Side Implementation: https://developers.braintreepayments.com/guides/paypal/server-side/php
Thanks to @jibon57 the configurations for the plugin
Settings app ios: https://github.com/jibon57/nativescript-braintree
Apache License Version 2.0, January 2004