mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-29 18:52:22 +01:00
[bug] unable to sync coupons on stripe
This commit is contained in:
parent
32230c3772
commit
427ba1a74b
@ -29,7 +29,7 @@ class SyncObjectsOnStripeWorker
|
||||
logger.debug "#{index} / #{total}"
|
||||
Stripe::Coupon.retrieve(coupon.code, api_key: Setting.get('stripe_secret_key'))
|
||||
rescue Stripe::InvalidRequestError
|
||||
Stripe::Service.create_coupon(coupon.id)
|
||||
Stripe::Service.new.create_coupon(coupon.id)
|
||||
end
|
||||
|
||||
w = StripeWorker.new
|
||||
|
@ -37,7 +37,7 @@ namespace :fablab do
|
||||
Coupon.all.each do |c|
|
||||
Stripe::Coupon.retrieve(c.code, api_key: Setting.get('stripe_secret_key'))
|
||||
rescue Stripe::InvalidRequestError
|
||||
Stripe::Service.create_coupon(c.id)
|
||||
Stripe::Service.new.create_coupon(c.id)
|
||||
end
|
||||
puts 'Done'
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user