From 1a4b25369b56719aeb09e852899ac1afd4af44ef Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Sun, 4 Aug 2024 09:14:26 +0200 Subject: [PATCH] Divide the amount received from Stripe by 100.0 --- 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"],