-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Coalesce implementations of Stripe payment forms #1761
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
Conversation
Is the split between Gold & Donate that one is recurring and the other is one time? |
import stripe | ||
from django.conf import settings | ||
|
||
stripe.api_key = getattr(settings, 'STRIPE_SECRET', None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems weird we're setting this on the object directly at the top level in a util function?
Seems like it should go in the app config, or on the ready() function?
Yeah, split between donate and gold is that gold is a subscription and donate is a charge on Stripe. On subscriptions we need to track at least the customer id, on charge we don't need to track any object id -- though could be if we had any use for it on the RTD side. |
Just seems weird to have 2 different places to give money, but I guess the "one time" vs "recurring" is different, but it seems odd to me as a user to have them in different places. I guess we could unify the UX while still having 2 diff forms. |
Well, the donation page is only really a concern when we do an explicit push towards donations, so it's very unlikely that users would be confused by that. I left the link to the donation page on the subscription form, but not convinced we need that there. |
Makes sense. We can just keep that as a backup, but Gold is the main thing. |
This uses `textInput` for better handling of text field operations like pasting and autofill. This should allow for card numbers to be pasted in on payment forms.
Return username instead
This eliminates the need to specify the api_key everywhere
Coalesce implementations of Stripe payment forms
This makes all of our implementations of payment forms use common bases, which
are also extendable into RTD.com. This implements several changes to how the
forms are used:
validation error handling
match
pieces of code into the shared base
on the Stripe fields they are associated with
The implementation for gold subscriptions changed slightly with this:
duplicating that code
that the stripe subscription always matches
The donation form implementation hasn't changed much, beside being updated to
use the base form and view classes.
Screenshots
Subscription Signup
Card rejection on subscription signup
Card rejection on CVV on subscription signup
Subscription details
Update subscription
Update subscription card showing
Confirm subscription deletion
Back to sign up, subscription cancelled