mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-07 01:54:16 +01:00
[bug] unable to sync coupons on stripe
This commit is contained in:
parent
209a2f4acf
commit
f5126084b9
@ -5,6 +5,7 @@
|
|||||||
- Fix a bug: unable to book a free event
|
- Fix a bug: unable to book a free event
|
||||||
- Fix a bug: can't see the dates for the next booked training session, when the user is reserving a machine without the appropriate training
|
- Fix a bug: can't see the dates for the next booked training session, when the user is reserving a machine without the appropriate training
|
||||||
- Fix a bug: invalid link to the user's manual
|
- Fix a bug: invalid link to the user's manual
|
||||||
|
- Fix a bug: unable to sync coupons on stripe
|
||||||
|
|
||||||
## v5.0.4 2021 June 15
|
## v5.0.4 2021 June 15
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@ class SyncObjectsOnStripeWorker
|
|||||||
total = Coupon.all.count
|
total = Coupon.all.count
|
||||||
Coupon.all.each_with_index do |coupon, index|
|
Coupon.all.each_with_index do |coupon, index|
|
||||||
logger.debug "#{index} / #{total}"
|
logger.debug "#{index} / #{total}"
|
||||||
Stripe::Coupon.retrieve(c.code, api_key: Setting.get('stripe_secret_key'))
|
Stripe::Coupon.retrieve(coupon.code, api_key: Setting.get('stripe_secret_key'))
|
||||||
rescue Stripe::InvalidRequestError
|
rescue Stripe::InvalidRequestError
|
||||||
Stripe::Service.create_coupon(c.id)
|
Stripe::Service.create_coupon(coupon.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
w = StripeWorker.new
|
w = StripeWorker.new
|
||||||
|
Loading…
x
Reference in New Issue
Block a user