Skip to content

Commit aa4c39e

Browse files
authored
Lowercase "usd" (#8393)
This is what Stripe does
1 parent 397832b commit aa4c39e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/controllers/stripe_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def handle_issuing_dispute_funds_reinstated
286286
dispute = event.data.object
287287
transaction = Stripe::Issuing::Transaction.retrieve(dispute["transaction"])
288288
hcb_code = RawPendingStripeTransaction.find_by!(stripe_transaction_id: transaction["authorization"]).canonical_pending_transaction.local_hcb_code
289-
if dispute["status"] == "won" && dispute["currency"] == "USD"
289+
if dispute["status"] == "won" && dispute["currency"] == "usd"
290290
StripeService::Payout.create(
291291
amount: dispute["amount"],
292292
currency: dispute["currency"],
@@ -300,7 +300,7 @@ def handle_issuing_dispute_funds_reinstated
300300
)
301301
elsif dispute["status"] != "won"
302302
Airbrake.notify("Dispute with funds reinstated but without a win: #{dispute["id"]}")
303-
elsif dispute["status"] != "USD"
303+
elsif dispute["currency"] != "usd"
304304
Airbrake.notify("Dispute with funds reinstated but non-USD currency. Must be manually handled.")
305305
end
306306
end

0 commit comments

Comments
 (0)