Divide the amount received from Stripe by 100.0
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
Benjamin Bach 2024-08-04 09:14:26 +02:00
parent ca8987ba3b
commit 1a4b25369b
No known key found for this signature in database
GPG key ID: 486F0D69C845416E

View file

@ -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"],