Skip to content

Instantly share code, notes, and snippets.

@dreoliv
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dreoliv/3559c28b230d5dee6b57 to your computer and use it in GitHub Desktop.
Save dreoliv/3559c28b230d5dee6b57 to your computer and use it in GitHub Desktop.
  • Minimize real dollar impact to donors by voiding on braintree before settlement
  • Correct totals online - I made a script for this. Might be safer to run the query first and see what it returns before voiding.
recurring_transfers = RecurringAccountTransfer.due.pluck(:id)

Transaction.where(recurring_account_transfer_id: recurring_transfers).each do |transaction|
  transaction.void!
end
  • Verify the impacted donors were fixed
  • Correct giving fund totals - After step 2, the users should have the amounts on their giving fund. We will need to void the deposits, but I don't think we can query for those, we'll probably need to do those by hand :sad:. The safest way would be finding the transactions by #transaction_tracking_code, using the tokens of the voided payments from Braintree. If you can get me the tracking codes from BT, I can prepare a script to do this.
  • Deploy bug fix and set monitor to retry false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment