From 1070e9388505aefef310f3f5424ed297a0b7f9e5 Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Sun, 4 Aug 2024 07:34:50 +0000 Subject: [PATCH] Divide the amount received from Stripe by 100.0 (#40) Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/40 Reviewed-by: valberg Co-authored-by: Benjamin Bach Co-committed-by: Benjamin Bach --- src/accounting/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/accounting/views.py b/src/accounting/views.py index 7d2a8ad..38a6d6e 100644 --- a/src/accounting/views.py +++ b/src/accounting/views.py @@ -168,7 +168,7 @@ def stripe_webhook(request: HttpRequest) -> HttpResponse: if not models.Payment.objects.filter(order=order).exists(): models.Payment.objects.create( order=order, - amount=Money(event["data"]["object"]["amount_total"], event["data"]["object"]["currency"]), + amount=Money(event["data"]["object"]["amount_total"] / 100.0, event["data"]["object"]["currency"]), description="Paid via Stripe", payment_type=models.PaymentType.objects.get_or_create(name="Stripe")[0], external_transaction_id=event["id"],