{"_id":"react-paypal-express-checkout","_rev":"9-43766517992f02b68682b2b813b1b12e","name":"react-paypal-express-checkout","description":"React component that renders Paypal's express check out button","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.1":{"name":"react-paypal-express-checkout","version":"1.0.1","description":"React component that renders Paypal's express check out button","repository":{"type":"git","url":"git+https://github.com/thinhvo0108/react-paypal-express-checkout.git"},"author":{"name":"Thinh Vo","email":"thinhvo0108@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/thinhvo0108/react-paypal-express-checkout/issues"},"homepage":"https://github.com/thinhvo0108/react-paypal-express-checkout","keywords":["react-component","react","react-paypal","paypal-checkout","express-checkout","paypal-express-checkout","paypal-button","checkout-button","paypal-checkout-button","paypal","express","button","checkout","check-out"],"options":{"mocha":"--require scripts/mocha_runner src/**/__tests__/**/*.js"},"scripts":{"prepublish":"babel --plugins 'transform-es2015-modules-umd' src --ignore __tests__ --out-dir ./dist","lint":"eslint ./src","lintfix":"eslint ./src --fix","testonly":"mocha $npm_package_options_mocha","test":"npm run lint && npm run testonly","test-watch":"npm run testonly -- --watch --watch-extensions js"},"devDependencies":{"babel-cli":"^6.6.4","babel-core":"^6.7.4","babel-eslint":"^6.0.2","babel-plugin-transform-es2015-modules-umd":"^6.6.5","babel-polyfill":"^6.7.4","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babel-preset-stage-2":"^6.5.0","chai":"^3.5.0","enzyme":"^2.2.0","eslint":"^2.7.0","eslint-plugin-babel":"^3.1.0","eslint-plugin-react":"^4.2.3","jsdom":"^8.1.0","mocha":"^2.4.5","nodemon":"^1.9.1","react-addons-test-utils":"^15.0.0","react":"^15.5.0","react-dom":"^15.5.0","sinon":"^1.17.3"},"peerDependencies":{"react":"~0.14.8 || ^15.5.0","react-dom":"~0.14.8 || ^15.5.0"},"dependencies":{"babel-runtime":"^6.6.1","prop-types":"^15.5.10","react-async-script-loader":"^0.2.2"},"_id":"react-paypal-express-checkout@1.0.1","_shasum":"a33b1cec7add6ae3e9015f2a634419ee1b0c4ddd","_from":".","_npmVersion":"4.0.3","_nodeVersion":"6.9.1","_npmUser":{"name":"thinhvo0108","email":"thinhvo0108@gmail.com"},"dist":{"shasum":"a33b1cec7add6ae3e9015f2a634419ee1b0c4ddd","tarball":"https://registry.npmjs.org/react-paypal-express-checkout/-/react-paypal-express-checkout-1.0.1.tgz","integrity":"sha512-wa07pVETAwL4VVTNJ0s9N1DJ32nQbJmgSVLx2/kr2SP1PCSwvwPKOzSbNWy9IeTAyrHvustMsHz7bSTGN1NMGg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAd8yFBy5bdqtc+QR9b35BQmDUDIcAesSs0QE3xKzAUAIgB/J3bk/yCcssw494Fg06m7DoI5cxmP27qyaCUq513RU="}]},"maintainers":[{"name":"thinhvo0108","email":"thinhvo0108@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-paypal-express-checkout-1.0.1.tgz_1495613921439_0.49379724566824734"},"directories":{}},"1.0.3":{"name":"react-paypal-express-checkout","version":"1.0.3","description":"React component that renders Paypal's express check out button","repository":{"type":"git","url":"git+https://github.com/thinhvo0108/react-paypal-express-checkout.git"},"author":{"name":"Thinh Vo","email":"thinhvo0108@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/thinhvo0108/react-paypal-express-checkout/issues"},"homepage":"https://github.com/thinhvo0108/react-paypal-express-checkout","keywords":["react-component","react","react-paypal","paypal-checkout","express-checkout","paypal-express-checkout","paypal-button","checkout-button","paypal-checkout-button","paypal","express","button","checkout","check-out"],"options":{"mocha":"--require scripts/mocha_runner src/**/__tests__/**/*.js"},"scripts":{"prepublish":"babel --plugins 'transform-es2015-modules-umd' src --ignore __tests__ --out-dir ./dist","lint":"eslint ./src","lintfix":"eslint ./src --fix","testonly":"mocha $npm_package_options_mocha","test":"npm run lint && npm run testonly","test-watch":"npm run testonly -- --watch --watch-extensions js"},"devDependencies":{"babel-cli":"^6.6.4","babel-core":"^6.7.4","babel-eslint":"^6.0.2","babel-plugin-transform-es2015-modules-umd":"^6.6.5","babel-polyfill":"^6.7.4","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babel-preset-stage-2":"^6.5.0","chai":"^3.5.0","enzyme":"^2.2.0","eslint":"^2.7.0","eslint-plugin-babel":"^3.1.0","eslint-plugin-react":"^4.2.3","jsdom":"^8.1.0","mocha":"^2.4.5","nodemon":"^1.9.1","react-addons-test-utils":"^15.0.0","react":"^16.0.0","react-dom":"^16.0.0","sinon":"^1.17.3"},"peerDependencies":{"react":"~0.14.8 || ^15.5.0","react-dom":"~0.14.8 || ^15.5.0"},"dependencies":{"babel-runtime":"^6.6.1","prop-types":"^15.5.10","react-async-script-loader":"^0.3.0"},"_id":"react-paypal-express-checkout@1.0.3","_shasum":"56a04625f4b4b315026fcf540b331de2eee8a580","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.3","_npmUser":{"name":"thinhvo0108","email":"thinhvo0108@gmail.com"},"dist":{"shasum":"56a04625f4b4b315026fcf540b331de2eee8a580","tarball":"https://registry.npmjs.org/react-paypal-express-checkout/-/react-paypal-express-checkout-1.0.3.tgz","integrity":"sha512-ocnpVPlN5oqBw1g56B1wtxsjkihd3KoJUm34xHwRhglDG9z96S4ugBmj66j+QwF3xLIDC1BKPN1Nfv7pl2tQsQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3BzH45IVYZueFidV/iZCPRmOEQNrfVhjW5d0/PQQPiQIgegdhcYD2Ac1jnhacQgfdHmUVrLx1Qct2akZ2nt7wJ5A="}]},"maintainers":[{"name":"thinhvo0108","email":"thinhvo0108@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-paypal-express-checkout-1.0.3.tgz_1507096197034_0.2818959495052695"},"directories":{}},"1.0.4":{"name":"react-paypal-express-checkout","version":"1.0.4","description":"React component that renders Paypal's express check out button","repository":{"type":"git","url":"git+https://github.com/thinhvo0108/react-paypal-express-checkout.git"},"author":{"name":"Thinh Vo","email":"thinhvo0108@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/thinhvo0108/react-paypal-express-checkout/issues"},"homepage":"https://github.com/thinhvo0108/react-paypal-express-checkout","keywords":["react-component","react","react-paypal","paypal-checkout","express-checkout","paypal-express-checkout","paypal-button","checkout-button","paypal-checkout-button","paypal","express","button","checkout","check-out"],"options":{"mocha":"--require scripts/mocha_runner src/**/__tests__/**/*.js"},"scripts":{"prepublish":"babel --plugins 'transform-es2015-modules-umd' src --ignore __tests__ --out-dir ./dist","lint":"eslint ./src","lintfix":"eslint ./src --fix","testonly":"mocha $npm_package_options_mocha","test":"npm run lint && npm run testonly","test-watch":"npm run testonly -- --watch --watch-extensions js"},"devDependencies":{"babel-cli":"^6.6.4","babel-core":"^6.7.4","babel-eslint":"^6.0.2","babel-plugin-transform-es2015-modules-umd":"^6.6.5","babel-polyfill":"^6.7.4","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babel-preset-stage-2":"^6.5.0","chai":"^3.5.0","enzyme":"^2.2.0","eslint":"^2.7.0","eslint-plugin-babel":"^3.1.0","eslint-plugin-react":"^4.2.3","jsdom":"^8.1.0","mocha":"^2.4.5","nodemon":"^1.9.1","react-addons-test-utils":"^15.0.0","react":"^16.0.0","react-dom":"^16.0.0","sinon":"^1.17.3"},"peerDependencies":{"react":"~0.14.8 || ^15.5.0","react-dom":"~0.14.8 || ^15.5.0"},"dependencies":{"babel-runtime":"^6.6.1","prop-types":"^15.5.10","react-async-script-loader":"^0.3.0"},"gitHead":"6a051c562a88048e06885f17ccceeb45861b1a5c","_id":"react-paypal-express-checkout@1.0.4","_shasum":"282ccfc8ebfc1ca358193ddce8dba0f09fb6f6fb","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"thinhvo0108","email":"thinhvo0108@gmail.com"},"dist":{"shasum":"282ccfc8ebfc1ca358193ddce8dba0f09fb6f6fb","tarball":"https://registry.npmjs.org/react-paypal-express-checkout/-/react-paypal-express-checkout-1.0.4.tgz","fileCount":9,"unpackedSize":147176,"integrity":"sha512-NXiHGO/YMUP35aluibM+5mSuLLivn7+/lNd/oNJQZ3eu9vaHSKBjmeqNiZh8NjoiY9SHWZOWp/76kPqC31Y6jw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYkzsfHn7IyQ5LpO/nl5w34GMskAzGkbl0MNmWbYg/VQIhAOJvEB9tEy+KDe7XOB3fF0nz5HfdiZpSyoFSltU/cmbd"}]},"maintainers":[{"name":"thinhvo0108","email":"thinhvo0108@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-paypal-express-checkout_1.0.4_1520833689588_0.28430749635058494"},"_hasShrinkwrap":false},"1.0.5":{"name":"react-paypal-express-checkout","version":"1.0.5","description":"React component that renders Paypal's express check out button","repository":{"type":"git","url":"git+https://github.com/thinhvo0108/react-paypal-express-checkout.git"},"author":{"name":"Thinh Vo","email":"thinhvo0108@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/thinhvo0108/react-paypal-express-checkout/issues"},"homepage":"https://github.com/thinhvo0108/react-paypal-express-checkout","keywords":["react-component","react","react-paypal","paypal-checkout","express-checkout","paypal-express-checkout","paypal-button","checkout-button","paypal-checkout-button","paypal","express","button","checkout","check-out"],"options":{"mocha":"--require scripts/mocha_runner src/**/__tests__/**/*.js"},"scripts":{"prepublish":"babel --plugins 'transform-es2015-modules-umd' src --ignore __tests__ --out-dir ./dist","lint":"eslint ./src","lintfix":"eslint ./src --fix","testonly":"mocha $npm_package_options_mocha","test":"npm run lint && npm run testonly","test-watch":"npm run testonly -- --watch --watch-extensions js"},"devDependencies":{"babel-cli":"^6.6.4","babel-core":"^6.7.4","babel-eslint":"^6.0.2","babel-plugin-transform-es2015-modules-umd":"^6.6.5","babel-polyfill":"^6.7.4","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babel-preset-stage-2":"^6.5.0","chai":"^3.5.0","enzyme":"^2.2.0","eslint":"^2.7.0","eslint-plugin-babel":"^3.1.0","eslint-plugin-react":"^4.2.3","jsdom":"^8.1.0","mocha":"^2.4.5","nodemon":"^1.9.1","react-addons-test-utils":"^15.0.0","react":"^16.0.0","react-dom":"^16.0.0","sinon":"^1.17.3"},"peerDependencies":{"react":"~0.14.8 || ^15.5.0","react-dom":"~0.14.8 || ^15.5.0"},"dependencies":{"babel-runtime":"^6.6.1","prop-types":"^15.5.10","react-async-script-loader":"^0.3.0"},"gitHead":"70b48ebb79ab827b77873f77e3e5f249a4a2a6aa","_id":"react-paypal-express-checkout@1.0.5","_npmVersion":"6.3.0","_nodeVersion":"6.9.2","_npmUser":{"name":"thinhvo0108","email":"thinhvo0108@gmail.com"},"dist":{"integrity":"sha512-J2s/C9ftuG/ja1/QelGSg4veXij5p9zNhOqr2wTw6ERprWpHbQm/JNx/U43G5aiqAnnoFxlKsFl+t1nAOqbw6w==","shasum":"8a2a24dce92551d32daa55a43e6cdcdafb6fec15","tarball":"https://registry.npmjs.org/react-paypal-express-checkout/-/react-paypal-express-checkout-1.0.5.tgz","fileCount":8,"unpackedSize":147496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbq4CMCRA9TVsSAnZWagAAjhcP/RkjrIKG6JEKKQoaasn6\nhpa4lU31IoJ4uIbwny9hTwt1j0wJXxYOqGTjBzsPhaAnZDxVENNte0k5hrZH\nYwRP/D9j4x5XI99AJJjI9961dXIg/PsQ58AFqH/REp2QMxvF0h6cbOLqP6Nr\nAsvx7OH7AmdsjtUUK5ec5idV8MHQSurEeIiVVMU9V21S7RYUiAWSnFOwsFxM\nVtkRFBq1yPhPi/sBkY8w+WcJ+DabZYL8HagyMytdWd45NB2fg9z50kfqQF82\njTnNeq8G/vbhqsy1qVzIOxYxs+lc7XN+PizssO1bg+iCGPCZ2WQikavtQpeL\nEhtKk+uJDU65N5ZG6i5Fw5FeqC57oN89HrIF1sTqbbMbmr4QAaE4megqK86J\nsObrLhdALv9nmzPebomIMllISma6DnEBMiAtwDTJQh69dqv00xxGc7zSp+2g\nxRzQyx99msfnhuW2t4OQ7RjfWRnx81YPrDJmSboJmbHVBDjo52/5yt79u2a7\nWljlMoKuDMgsNYS7Nd0XZrxERo3H1I9irI1dQO+H0Btek55JMjrs4vojvgyJ\nH1RUwmMWXguXcAo+gIWN9nlXc8vfLSqxA72GihNF3w0XNd3wzoAKTxZVHnu6\nNx1lqGN4YlLJ3ynv2mB3cUphMQECMCac8p1wBx8yLgCpL50nIHSwm8fJK7MP\nCZyo\r\n=P4dU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYzsStLTi6M/Tl2r2uszjKx7VZD4d429jgv4oRMiqnGQIgaGQqt6RCCXbF2M24IyI5Xgg1gpBORNRc8+/yYhmha2U="}]},"maintainers":[{"name":"thinhvo0108","email":"thinhvo0108@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-paypal-express-checkout_1.0.5_1537966219617_0.01746082946506511"},"_hasShrinkwrap":false}},"readme":"# react-paypal-express-checkout\nReact component that renders Paypal's express check out button\n\n## Install\n\n```bash\nnpm install --save react-paypal-express-checkout\n```\n\n## Usage\n\n## Simplest Example (with minimum set of parameters, this will use the \"sandbox\" environment)\n\n```javascript\nimport PaypalExpressBtn from 'react-paypal-express-checkout';\n\nexport default class MyApp extends React.Component {\n\trender() {\n\t\tconst client = {\n\t\t\tsandbox:    'YOUR-SANDBOX-APP-ID',\n\t\t\tproduction: 'YOUR-PRODUCTION-APP-ID',\n\t\t}\n        return (\n            <PaypalExpressBtn client={client} currency={'USD'} total={1.00} />\n        );\n    }\n}\n```\n\n### Full Example\n\n```javascript\nimport React from 'react';\nimport PaypalExpressBtn from 'react-paypal-express-checkout';\n\nexport default class MyApp extends React.Component {\n    render() {\n\t\tconst onSuccess = (payment) => {\n\t\t\t// Congratulation, it came here means everything's fine!\n            \t\tconsole.log(\"The payment was succeeded!\", payment);\n            \t\t// You can bind the \"payment\" object's value to your state or props or whatever here, please see below for sample returned data\n\t\t}\n\n\t\tconst onCancel = (data) => {\n\t\t\t// User pressed \"cancel\" or close Paypal's popup!\n\t\t\tconsole.log('The payment was cancelled!', data);\n\t\t\t// You can bind the \"data\" object's value to your state or props or whatever here, please see below for sample returned data\n\t\t}\n\n\t\tconst onError = (err) => {\n\t\t\t// The main Paypal's script cannot be loaded or somethings block the loading of that script!\n\t\t\tconsole.log(\"Error!\", err);\n\t\t\t// Because the Paypal's main script is loaded asynchronously from \"https://www.paypalobjects.com/api/checkout.js\"\n\t\t\t// => sometimes it may take about 0.5 second for everything to get set, or for the button to appear\n\t\t}\n\n\t\tlet env = 'sandbox'; // you can set here to 'production' for production\n\t\tlet currency = 'USD'; // or you can set this value from your props or state\n\t\tlet total = 1; // same as above, this is the total amount (based on currency) to be paid by using Paypal express checkout\n\t\t// Document on Paypal's currency code: https://developer.paypal.com/docs/classic/api/currency_codes/\n\n\t\tconst client = {\n\t\t\tsandbox:    'YOUR-SANDBOX-APP-ID',\n\t\t\tproduction: 'YOUR-PRODUCTION-APP-ID',\n\t\t}\n\t\t// In order to get production's app-ID, you will have to send your app to Paypal for approval first\n\t\t// For sandbox app-ID (after logging into your developer account, please locate the \"REST API apps\" section, click \"Create App\"):\n\t\t//   => https://developer.paypal.com/docs/classic/lifecycle/sb_credentials/\n\t\t// For production app-ID:\n\t\t//   => https://developer.paypal.com/docs/classic/lifecycle/goingLive/\n\n\t\t// NB. You can also have many Paypal express checkout buttons on page, just pass in the correct amount and they will work!\n        return (\n            <PaypalExpressBtn env={env} client={client} currency={currency} total={total} onError={onError} onSuccess={onSuccess} onCancel={onCancel} />\n        );\n    }\n}\n```\n\n### Props\n\n- `env: String (default: \"sandbox\")` - You can set this to \"production\" for production\n- `client: Object (with \"sandbox\" and \"production\" as keys)` - MUST set, please see the above example\n- `currency: String (\"USD\", \"JPY\" etc.)` - MUST set, please see the above example\n- `total: Number (1.00 or 1 - depends on currency)` - MUST set, please see the above example\n- `shipping: Number (1 or 2 or 3)` - Ability to change if a shipping address is included in checkout, 0 is default and means optional, 1 is no shipping address, 2 is shipping is required\n- `onError: Callback function (happens when Paypal's main script cannot be loaded)` - If not set, this will take the above function (in example) as a default return\n- `onSuccess: Callback function (happens after payment has been finished successfully)` - If not set, this will take the above function (in example) as a default return\n- `onCancel: Callback function (happens when users press \"cancel\" or close Paypal's popup)` - If not set, this will take the above function (in example) as a default return\n- `paymentOptions: (optional) enable many options: full \"transactions\" object and also \"note_to_payer\", \"redirect_urls\", \"intent\" etc.` - https://developer.paypal.com/docs/integration/direct/payments/authorize-and-capture-payments/#authorize-the-payment\nhttps://developer.paypal.com/docs/api/payments/v1/\n\n- `style: (optional) change appearance of Paypal button based on their document: size, color, shape, label` - https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/customize-button/\n\n## Sample Returned Data\n\n- `onSuccess` - the returned `payment` object will look like:\n\t+ `{paid: true, cancelled: false, payerID: \"H8S4CU73PFRAG\", paymentID: \"PAY-47J75876PA321622TLESPATA\", paymentToken: \"EC-8FE085188N269774L\", returnUrl: \"https://www.sandbox.paypal.com/?paymentId=PAY-47J75876PA321622TLESPATA&token=EC-8FE085188N269774L&PayerID=H8S4CU73PFRAG\"}`\n- `onCancel` - the returned `data` object will look like:\n\t+ `{paymentToken: \"EC-42A825696K839141X\", cancelUrl: \"https://www.sandbox.paypal.com?token=EC-42A825696K839141X\"}`\n\n### Reference Document on How to Have Paypal's Developer Account and Merchant + Buyer accounts\n\n- In fact, please just go to Paypal's developer page, login with your \"Real\" Paypal account:\n\t+ Click on the \"Sandbox accounts\" on the left hand side\n\t+ You will see Merchant + Buyer accounts have been created automatically\n\t+ You can then change password, profile, can also clone those accounts, or create more accounts (choose country, default currency, set amount for new accounts)\n- You can check balance & transaction history of those testing accounts (the same as real accounts)\tby login with the accounts' credentials with:\n\t+ https://www.sandbox.paypal.com/\n- Official documents here: (just be patient and go step-by-step, by clicking their next topic's button on page, you can then understand the whole process!)\n\t+ https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/create_payment_button/\n\n## TODO\n\n- Upgrade this library into more advanced Paypal button library (with features like recurring, add-to-cart, checkout-now etc.)\n- Fork & pull-request are very welcomed!\n\n## Thank you\n\n- [React NPM Boilerplate](https://github.com/juliancwirko/react-npm-boilerplate)\n\n## License\n\nMIT\n","maintainers":[{"name":"thinhvo0108","email":"thinhvo0108@gmail.com"}],"time":{"modified":"2022-06-26T07:32:56.198Z","created":"2017-05-24T08:18:41.503Z","1.0.1":"2017-05-24T08:18:41.503Z","1.0.3":"2017-10-04T05:49:57.122Z","1.0.4":"2018-03-12T05:48:09.809Z","1.0.5":"2018-09-26T12:50:19.747Z"},"homepage":"https://github.com/thinhvo0108/react-paypal-express-checkout","keywords":["react-component","react","react-paypal","paypal-checkout","express-checkout","paypal-express-checkout","paypal-button","checkout-button","paypal-checkout-button","paypal","express","button","checkout","check-out"],"repository":{"type":"git","url":"git+https://github.com/thinhvo0108/react-paypal-express-checkout.git"},"author":{"name":"Thinh Vo","email":"thinhvo0108@gmail.com"},"bugs":{"url":"https://github.com/thinhvo0108/react-paypal-express-checkout/issues"},"license":"MIT","readmeFilename":"README.md","users":{"jsrjsr0040":true,"fmakareev":true}}