summaryrefslogtreecommitdiff
path: root/fundraising
diff options
context:
space:
mode:
authorBaptiste Mispelon <bmispelon@gmail.com>2025-01-20 15:55:21 +0100
committerBaptiste Mispelon <bmispelon@gmail.com>2025-01-20 15:58:41 +0100
commit418d58941a25897f909ac7d9bc883f7418f6c2fe (patch)
tree3fd530b83581ce7bae4613003af593f9de827d8c /fundraising
parent10ca17abf72add4ecc71e4fd836e7c137283d939 (diff)
Fixed checkout webhook after Stripe client update
Diffstat (limited to 'fundraising')
-rw-r--r--fundraising/views.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/fundraising/views.py b/fundraising/views.py
index f7e13853..b7cd3f9b 100644
--- a/fundraising/views.py
+++ b/fundraising/views.py
@@ -316,10 +316,9 @@ class WebhookHandler:
)
if interval == "onetime":
payment_intent = stripe.PaymentIntent.retrieve(session.payment_intent)
- charge = payment_intent.charges.data[0]
donation.payment_set.create(
amount=dollar_amount,
- stripe_charge_id=charge.id,
+ stripe_charge_id=payment_intent.latest_charge,
)
# Send an email message about managing your donation