A sample bot that demonstrates an integration between Bot Framework and PayPal
Download and install a Bot Framework emulator, as this bot can be run locally: https://docs.botframework.com/en-us/tools/bot-framework-emulator/
Create a PayPal account, and then create an application. You can do that here: https://developer.paypal.com/developer/applications/create. After creating the application, grab the Client ID and Client Secret from the application dashboard. These will be used to allow the bot to connect to PayPal.
Create a PayPal sandbox test user here: https://developer.paypal.com/developer/accounts/. This is only needed if you use the PayPal "sandbox" environment to test payments. You can change the environment PayPal will create payments on by changing the
PAYPAL_CLIENT_MODEenvironment variable to "live".
Export these environment variables: PAYPAL_CLIENT_MODE, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET.
For Mac OS/Linux:
export PAYPAL_CLIENT_MODE="sandbox" PAYPAL_CLIENT_ID="YOUR CLIENT ID FROM PAYPAL" PAYPAL_CLIENT_SECRET="YOUR CLIENT SECRET FROM PAYPAL"
For Windows using PowerShell:
$env:PAYPAL_CLIENT_MODE = "sandbox" $env:PAYPAL_CLIENT_ID = "YOUR CLIENT ID FROM PAYPAL" $env:PAYPAL_CLIENT_SECRET = "YOUR CLIENT SECRET FROM PAYPAL"
Assuming that you've installed a version of Node 6:
git clone http://github.com/bnookala/node-paymentbot
- Start up the emulator, verify the 'Bot URL' field is the same as the URL written to your console by the application.
MIT. See LICENSE file.