https://github.com/interledgerjs/settlement-paypal
An Interledger settlement engine for PayPal
https://github.com/interledgerjs/settlement-paypal
Last synced: about 1 month ago
JSON representation
An Interledger settlement engine for PayPal
- Host: GitHub
- URL: https://github.com/interledgerjs/settlement-paypal
- Owner: interledgerjs
- Created: 2019-07-26T07:41:37.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-03T04:39:43.000Z (over 2 years ago)
- Last Synced: 2025-03-30T23:31:34.281Z (2 months ago)
- Language: TypeScript
- Size: 546 KB
- Stars: 8
- Watchers: 2
- Forks: 5
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PayPal ILP Settlement Engine
This repository houses an implementation of an ILP settlement engine for PayPal per the proposed [Settlement RFC](https://github.com/interledger/rfcs/pull/536)!
Due to the limitations of `paypal-rest-sdk`, this settlement engine requires transactions to occur between PayPal business accounts. In order to listen for payments, this engine requires manual configuration of account settings to include an endpoint for Instant Payment Notifications.
## Usage
[Create](https://developer.paypal.com/developer/applications/create) a PayPal application in live or sandbox mode on the developer site.
Configure `launch.ts` with the corresponding PayPal email, id, and secret of the application.
In the [settings](https://www.sandbox.paypal.com/businessmanage/settings/website) of the PayPal business account, add the endpoint url that listens for Instant Payment Notifications. The url is set to follow this format: `https://{hostname}/{clientid}/ipn`.
To launch, run:
```
npm run start
```## Testing
Utilize the PayPal [Webhook Simulator](https://developer.paypal.com/developer/webhooksSimulator/) to simulate `Payment payouts-item succeeded`, which this engine listens for.
In order to test the handling of an incoming transaction, create a separate business account in the same mode to send a payout to the account on the engine. Configure `pay.ts` at the top of the script, and run:
```
npm run build && node ./build/pay.js
```## TODO
- [ ] Add webhook and ipn verification logic
- [ ] Add integration tests## Contributing
Pull requests are welcome. Please fork the repository and submit!