Create a file named secrets.py and fill in your API credentials:
wufoo_api_key = ''
paypal_api_username = ''
paypal_api_password = ''
paypal_api_signature = ''
mailgun_api_key = ''
Install dependencies
pip3 install requests
To run script
python3 run.py
To run locally (http://localhost:8000/)
python3 -m http.server
- Very cool contrib page: http://www.arduino.cc/en/Main/Donate
- https://www.flickr.com/photos/94324846@N05/sets/72157634977479181/
- http://triplecrownforheart.ca/gallery/
- Rider registration is hosted on Wufoo
- Rider donations are done via PayPal
- Data is pulled from Wufoo and PayPal to generate JSON files
- Donation site uses JSON file to populate rider pages
- Script is run at set intervals to update JSON file
- Updates are pushed to this GitHub repo
- Fetch donors from Wufoo API
- https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/formbasics/
- https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/#id08A6HF00TZS
Notes: Using PayPal instead of Stripe because they let us pass & retrieve a custom variable containing donation details.
- Get credentials to use NVP API
- Use TransactionSearch API Operation (NVP) to find recent transactions
- Use GetTransactionDetails API Operation (NVP) to get custom field
Notes: REST API requires OAuth 2 client authentication. Not ideal for server-less implementation.