Skip to content

Commit 6031bdc

Browse files
committed
Name price as price_in_cents
Stripe handles the price in cents. So it's better to be explicit here.
1 parent 65d6989 commit 6031bdc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

readthedocs/gold/views.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,13 @@ def post(self, request, format=None):
243243
# TODO: find a better way to extend this view for one-time donations.
244244
from readthedocsext.donate.utils import handle_payment_webhook
245245
stripe_session = event.data.object.id
246-
price = event.data.object.amount_total
247-
handle_payment_webhook(username, stripe_customer, stripe_session, price)
246+
price_in_cents = event.data.object.amount_total
247+
handle_payment_webhook(
248+
username,
249+
stripe_customer,
250+
stripe_session,
251+
price_in_cents,
252+
)
248253
except ImportError:
249254
log.warning(
250255
'Not able to import handle_payment_webhook for one-time donation.',

0 commit comments

Comments
 (0)