Divide the amount received from Stripe by 100.0 (#40)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #40 Reviewed-by: valberg <valberg@orn.li> Co-authored-by: Benjamin Bach <benjamin@overtag.dk> Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
This commit is contained in:
parent
ca8987ba3b
commit
1070e93885
|
@ -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"],
|
||||
|
|
Loading…
Reference in a new issue