Skip to content
An Interledger settlement engine for PayPal
TypeScript
Branch: master
Clone or download
Latest commit 7df6e6e Jul 29, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Update ENV variables Jul 29, 2019
test Add codebase Jul 26, 2019
.gitignore Add codebase Jul 26, 2019
.npmignore Add codebase Jul 26, 2019
README.md Update README.md to fix minor syntax error Jul 26, 2019
package-lock.json Add codebase Jul 26, 2019
package.json Update repository properties Jul 26, 2019
tsconfig.json Add codebase Jul 26, 2019
tslint.json Add codebase Jul 26, 2019

README.md

PayPal ILP Settlement Engine

This repository houses an implementation of an ILP settlement engine for PayPal per the proposed Settlement RFC!

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 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 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 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!

You can’t perform that action at this time.