@mispace/paypal-nvp
v1.0.5
Published
A simple paypal package with MUINode and react package
Readme
paypal-nvp
NPM plugin using paypal nvm for payment and authorization
Installation
npm install @mispace/paypal-nvpOR
yarn add @mispace/paypal-nvpEnvironment Variables
To run this project, you will need to add the following environment variables to your .env file
Following are the required .env variables for the paypal-nvp package
PAYPAL_PAYMENT_METHODPAYPAL_PAYMENT_ACTIONPAYPAL_BILLING_TYPEPAYPAL_USERNAMEPAYPAL_PASSWORDPAYPAL_SIGNATUREPAYPAL_VERSIONPAYPAL_API_URLPAYPAL_REDIRECT_URL
NodeJs side
const paypalnvp = require('@mispace/paypal-nvp/api');
app.use(paypalnvp());NodeJs side with logger
const paypalnvp = require('@mispace/paypal-nvp/api');
app.use(paypalnvp({logger}));ReactJs side
import PayPalButton from "@mispace/paypal-nvp/button";use the package in you component as shown below
<PayPalButton className="paypal-btn" label="Pay With PayPal" returnUrl="/paypal-return" cancelUrl="/paypal-cancel" desc="product name / any text" />Available properties for button
className# css class namelabel# button labelreturnUrl# reqcancelUrl# reqdesc# purchase product descriptionamount# purchase product price
Below are the versions used for this paypal-nvp package
- Node >= 16.0.0
- React >= 18.0.0
- webpack = 5.89.0
- MUI = 7.2.0
- Axios = 1.9.0
Tech Stack
Client: React, MUI, Axios
Server: Node, Express, Axios
Reference links
- https://www.npmjs.com/package/@mispace/paypal-nvp
- https://developer.paypal.com/api/nvp-soap/do-authorization-nvp/
