Skip to content

csytan/triplecrownforheart

Repository files navigation

Triple Crown for Heart - Donation Pages

Setup

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

Ideas

Media

How it works

  • 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

Wufoo

PayPal Standard payments

Notes: Using PayPal instead of Stripe because they let us pass & retrieve a custom variable containing donation details.

PayPal Fetching Data

  1. Get credentials to use NVP API
  2. Use TransactionSearch API Operation (NVP) to find recent transactions
  3. Use GetTransactionDetails API Operation (NVP) to get custom field

Notes: REST API requires OAuth 2 client authentication. Not ideal for server-less implementation.

About

Triple Crown for Heart: Rider Donation Page

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published