Triple Crown for Heart: Rider Donation Page
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
CNAME
donations.json
email_donation_notify.txt
email_donor.txt
email_welcome.txt
index.html
readme.md
riders.json
run.py
run.sh
script.js
style.css

readme.md

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.