Seems that nobody has yet developed a react's paypal button until today (for react-native, there may be one, but my library is the first), that's why I have just created one for everybody!
==========
For everyone's reference, if you want to use Paypal's express checkout button (simply passing the total amount to be paid)
Please use react-paypal-express-checkout
(I'm the author):
Install:
npm install --save react-paypal-express-checkout
Simplest Example (but it will show the Paypal express check out button):
import React from 'react';
import PaypalExpressBtn from 'react-paypal-express-checkout';
export default class MyApp extends React.Component {
render() {
const client = {
sandbox: 'YOUR-SANDBOX-APP-ID',
production: 'YOUR-PRODUCTION-APP-ID',
}
return (
<PaypalExpressBtn client={client} currency={'USD'} total={1.00} />
);
}
}
==========
For more detailed document, please go here:
https://github.com/thinhvo0108/react-paypal-express-checkout
This library was developed for reactjs, written in ES6, simple but yet workable, please check my tutorials for both simplest and full examples
This library provides the Paypal's express check out button (which means we can now just pass in the total amount to be paid)
Later, more advanced features will come!
Fork & pull-request are welcomed, and please also give me credit if you use or find it interesting!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…