card_charger

class gratipay.card_charger.Braintree[source]

Sends data to Braintree.

charge(params)[source]

Charge using the Braintree APi, returning a result.

class gratipay.card_charger.FakeBraintree[source]

For offline use.

charge(params)[source]

Return a fake result. Partially implements Braintree’s testing logic:

  • fake-valid-nonce returns a success result
  • amount >= 2000 returns a failure result
  • otherwise return an error result

https://developers.braintreepayments.com/reference/general/testing/python