Skip to content

Commit

Permalink
Mark any paid transactions as uncancelled
Browse files Browse the repository at this point in the history
Rarely, we can have a transaction get marked as cancelled on our end while going through on Stripe's end. This will automatically uncancel any transactions that get marked as paid. Also renames "Refund Item" to "Refund Options" to hopefully make what that button does clearer.
  • Loading branch information
kitsuta committed Oct 4, 2023
1 parent 168da48 commit 5072a77
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 @@ -1095,6 +1095,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 5072a77

Please sign in to comment.