stephenmcd/cartridge

Stripe integration no longer works

Opened this issue · 1 comments

jbrnd commented

It appears that the Stripe payment integration is no longer functional.

After fixing an initial error ("module 'stripe' has no attribute 'CardError'), test payments are still declined by Stripe, coming back with a message

{ "error": { "message": "Sending credit card numbers directly to the Stripe API is generally unsafe. We suggest you use test tokens that map to the test card you are using, see https://stripe.com/docs/testing.", "type": "invalid_request_error" } }

The reason is that Stripe now seems to require tokenization of the CC number, rather than passing the number directly. Some related links:

https://packagist.org/packages/omnipay/stripe
https://stackoverflow.com/questions/46720159/stripe-payment-params-error-type-invalid-request-error
https://groups.google.com/g/mezzanine-users/c/e8bSj0e7KI0/m/rNEaZm1kDAAJ
https://groups.google.com/g/mezzanine-users/c/aN8nZUuM4Oc/m/Mof4rTW0CgAJ
https://stripe.com/docs/payments/accept-a-payment?integration=checkout
https://stripe.com/docs/payments/integration-builder

jbrnd commented

Another useful link, with some code for using the Stripe API with tokenization: https://groups.google.com/g/mezzanine-users/c/N3zRzsTrRu8/m/lIYf_r9DozEJ