Created
December 21, 2019 20:40
-
-
Save chrisbolman/804c82f53fd564f4af31a0b803618a95 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if form.is_valid(): | |
customer = Customer.objects.get_or_create_for_user(request.user) | |
token = form.cleaned_data['stripeToken'] | |
card = Card(customer=customer, stripe_card_id=token) | |
try: | |
card.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment