From 881f8d3efb27ac591365c9f866a8e7ce4b9b295d Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 16 Nov 2020 14:24:36 +0100 Subject: [PATCH] [bug] unable to create a coupon on stripe --- CHANGELOG.md | 5 +++-- app/workers/stripe_worker.rb | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bf902886..93ad3682b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,11 @@ - Fix a bug: unable to build homepage custom stylesheet - Fix a bug: unable to access embedded plan views - Fix a bug: warning message overflow in credit wallet modal -- Fix a bug: when a cash coupon was used, an invalid amount is shown in the statistics +- Fix a bug: when using a cash coupon, the amount shown in the statistics is invalid +- Fix a bug: unable to create a coupon on stripe - [TODO DEPLOY] `rails fablab:stripe:plans_prices` - [TODO DEPLOY] `rails fablab:maintenance:rebuild_stylesheet` -- [TODO DEPLOY] `rails fabalb:stripe:set_product_id` +- [TODO DEPLOY] `rails fablab:stripe:set_product_id` ## v4.6.3 2020 October 28 diff --git a/app/workers/stripe_worker.rb b/app/workers/stripe_worker.rb index 0b74c53be..1ae605acf 100644 --- a/app/workers/stripe_worker.rb +++ b/app/workers/stripe_worker.rb @@ -31,7 +31,7 @@ class StripeWorker stp_coupon[:percent_off] = coupon.percent_off elsif coupon.type == 'amount_off' stp_coupon[:amount_off] = coupon.amount_off - stp_coupon[:currency] = Rails.application.secrets.stripe_currency + stp_coupon[:currency] = Setting.get('stripe_currency') end stp_coupon[:redeem_by] = coupon.valid_until.to_i unless coupon.valid_until.nil?