Skip to content

Commit

Permalink
Uncancel paid transactions
Browse files Browse the repository at this point in the history
Adds a failsafe where any transaction marked as paid is uncancelled, to fix rare cases where Stripe takes money but our system thinks the transaction got cancelled instead.
  • Loading branch information
kitsuta committed Oct 9, 2023
1 parent cceaf7f commit 39fd894
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions uber/payments.py
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,9 @@ def mark_paid_from_ids(intent_id, charge_id):
session.add(txn)
txn_receipt = txn.receipt

if txn.cancelled != None:
txn.cancelled == None

for item in txn.receipt_items:
item.closed = datetime.now()
session.add(item)
Expand Down
2 changes: 1 addition & 1 deletion uber/templates/reg_admin/receipt_items.html
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ <h2>Receipt{% if other_receipts %}s{% endif %} for {% if model.attendee %}{{ mod
Refund
{% else %}
refundItem('{{ item.id }}', '{{ (item.amount / 100)|format_currency }}', '{{ item.count }}', '{{ item.revert_change|yesno }}')">
Refund Item
Refund Options
{% endif %}
</button>
{% endif %}
Expand Down

0 comments on commit 39fd894

Please sign in to comment.