-
-
Notifications
You must be signed in to change notification settings - Fork 987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stripe SCA support #1052
Comments
Hi @benjaoming Thanks for this! I will take a proper look tomorrow. |
Hey @benjaoming — Thanks again here. It's very clear. I shall have a pop at it and ping you when it doesn't work. 😉 |
Ok, post Thursday update. We need a slight update to the flow we're using. We'll use the new hosted checkout page. That'll let us use the Portal for managing subscriptions too, which is less code for us. I'll potter over the weekend and finish next week now. |
Part 1 is #1058 — main donation page. I'll follow-up shortly updating the backend Manage your donations page. Finally I'll cleanup and update the Stripe API version to latest and so on. |
Note to self: I can add max value validator to the donation form (for silly values, which Sentry occasionally reports). |
Sentry issue: DJANGOPROJECTCOM-EW |
Stripe's API rejects very large values. Sentry reports folks enjoying spending the weekend entering such large values. So reject as invalid, and show an appropriate alert before attempting to contact Stripe.
Stripe's API rejects very large values. Sentry reports folks enjoying spending the weekend entering such large values. So reject as invalid, and show an appropriate alert before attempting to contact Stripe.
Stripe's API rejects very large values. Sentry reports folks enjoying spending the weekend entering such large values. So reject as invalid, and show an appropriate alert before attempting to contact Stripe.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
/unstale |
@cgl This was the holding issue for the Stripe updates we were discussing at DjangoCon. Basically, we'd like to use the Stripe hosted portal, and then remove the direct API integration code, closing the related issues (We have OK from the board for that, and things like privacy policy and T&C to add to the site and all that Jazz — but we ran out of steam into 🦠 ...) |
Hey @carltongibson thanks for pointing out. I can work on it. Is there any draft work I should be aware of other than the merged PR? I will have a better look later. |
Hey @cgl. Right, yes... 😜 — I got to a certain point with this implementing the Stripe portal, and then we needed Privacy Policy and such, which I got drafts for some time later, but never got back to.
I think first pass would be get a feel for how it is, and then a sketch of a plan for the later bits before necessarily coding too much is a good idea. But launching the Stripe session for the portal isn't too hard — you just need the customer ID — so that first part should be doable. (I recall thinking I wasn't that far away...) Thanks for the interest here. It's precisely one of those areas where there's lots of ideas, but a real need for somebody to lead the effort 🎁 |
Background
New EU legislation means that online card payment has to go through the issuer's 2FA. This is known as "Strong Customer Authentication". Some background here: https://support.stripe.com/questions/strong-customer-authentication-sca-enforcement-date
Solution
AFAIK, in order to process payments for fundraising, Django needs to use newer API and patterns offered by Stripe. I have an existing implementation to refer to.
Firstly, a checkout session is created and the user goes through Stripe's pages for payments. This is almost the same as before, except there is no modal popup on the shop's own site, but you to through a branded Stripe page.
Following this, the main change is that now the backend processes the payment through an async callback to a webhook which it receives from Stripe.
In the frontend, the user is redirected to a custom success/failure page. But AFAIK, this page has to be generic because it cannot assume that the payment is successful until the webhook is called.
Here is an implementation of a webhook that processes the successful session:
Reference
The text was updated successfully, but these errors were encountered: