PayPal Notifications
PayPal client for IPN (Instant Payment Notification) and PDT (Payment Data Transfer) notifications.
Installation
-
Get package:
npm i paypal-notifications -S -
Import it in your code:
const Paypal =
Setup
Instant Payment Notification
TODO
Payment Data Transfer
- Go to Website Payment Preferences
- Set the Return URL
- Turn the Payment Data Transfer on
- Get the Identity Token
- Save
See the PayPal documentation for more details.
Usage
Make a client with the environment (true
for live, false
for sandbox) and your token.
const paypalToken = 'G-ddvHQfRB2wqzrHCgdkbx0uXEcgKTcWbG2GjlI581zbPbGxKekGXgyVwU0'const paypalClient = false paypalToken
Instant Payment Notification
TODO
Payment Data Transfer
Use the pdt
method to retrive a transaction by its ID.
The callback receives an eventual error and, if all goes well, the whole transaction object.
paypalClient