Skip to content

Commit

Permalink
check that currency corresponds in recurring price
Browse files Browse the repository at this point in the history
  • Loading branch information
grishick committed Apr 25, 2024
1 parent 878da8d commit 6e605c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/stripeLib.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ class StripeLib {
let priceID = null;
let prices = await stripe.prices.list({product: productID});
for(let i=0; i<prices.data.length; i++) {
if(prices.data[i].unit_amount == req.body.amount*100) {
if(prices.data[i].unit_amount == req.body.amount*100 && prices.data[i].currency.toLowerCase() == req.body.currency.toLowerCase()) {
priceID = prices.data[i].id;
Sentry.addBreadcrumb({
category: "stripe",
Expand Down

0 comments on commit 6e605c9

Please sign in to comment.