Always immediately capture payments.

This commit is contained in:
Christopher Neugebauer 2016-09-22 11:44:30 +10:00
parent ed1087d9d3
commit 26b249d48d

View file

@ -105,13 +105,12 @@ def process_card(request, form, inv):
conference.title, inv.invoice.id
)
try:
charge = actions.charges.create(
amount_to_pay,
customer,
currency=CURRENCY,
description=description,
capture=False,
capture=True,
)
receipt = charge.stripe_charge.receipt_number
@ -126,11 +125,6 @@ def process_card(request, form, inv):
amount=charge.amount,
charge=charge,
)
except StripeError as e:
raise e
finally:
# Do not actually charge the account until we've reconciled locally.
actions.charges.capture(charge)
inv.update_status()