Immediately after payday we send money to some people using PayPal's MassPay feature.
update exchange_routes set fee_cap = 20.00 where fee_cap is null and network = 'paypal';to work around this bug.
./masspay.shto hit the database and generate three CSV files. This script is read-only and can safely be run multiple times.
- Log in to PayPal and navigate to the MassPay feature.
- Upload the
.*.paypal.csvfile from step 2 and write a note with subject “Gratipay Payout” and body “Here you go! Thanks for using Gratipay! :-)”
- Submit the MassPay and double check the amount and the fee against the
stdoutfrom step 1 (not to be confused with the output files from step 1!). PayPal caps the fee at $1 for U.S. accounts and $20 for non-U.S. accounts. Unfortunately, the only way to determine the fee cap for a given account (that we've discovered) is to try uploading the CSV MassPay file and see if our guess matches what PayPal in fact computes.
- If the amounts don't match then we have a bad
paypal_fee_capfor one of the users. Manually bisect the
.*.input.csvfile from step 2, running
./bin/masspay.py -oto generate the
.*output.*.csvfiles, and then running through steps 4 and 5, until you discover the culprit. Manually run
update exchange_routes set fee_cap=1 where address='the email address';, then start all over from step 2.
- When everything checks out, pull the trigger on the MassPay.
- Click “View Activity Details,” and then drill down on the new MassPay.
- Wait a few minutes, then refresh the page. You should see “N claimed” or something.
- Download the CSV they give you. It will save as
- Move the
git committhe four new files.
cdback to the main repo root and run
./env/bin/python ./bin/masspay.py -pto post back to Gratipay using the
record-an-exchangeendpoint. When prompted enter your own personal Gratipay API key. Make sure this works by inspecting the
exchangestable. Don't forget this step!
- Note the result on the payday ticket: “MassPay done and posted back for N users.”