Fix 'Donate again'

- Make it work with latest version of Stripe
This commit is contained in:
Olivier Benz 2021-12-20 09:30:07 +01:00 committed by Drew DeVault
parent 69d5821948
commit 70beb58339
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ def donate():
db.add(user)
else:
customer = stripe.Customer.retrieve(user.stripe_customer)
new_source = customer.sources.create(source=stripe_token)
new_source = customer.create_source(user.stripe_customer, source=stripe_token)
customer.default_source = new_source.id
customer.save()