mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
[bug] unable to run task find_incoherent_invoices
This commit is contained in:
parent
47fe464954
commit
6f3a1d0c6a
@ -1,5 +1,7 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
- Fix a bug: unable to run task find_incoherent_invoices
|
||||
|
||||
## v4.5.5 2020 August 26
|
||||
|
||||
- Improved portuguese translations
|
||||
|
@ -25,7 +25,7 @@ namespace :fablab do
|
||||
end
|
||||
end
|
||||
Invoice.where('created_at > ? AND stp_invoice_id IS NOT NULL', date).each do |invoice|
|
||||
stp_invoice = Stripe::Invoice.retrieve(invoice.stp_invoice_id)
|
||||
stp_invoice = Stripe::Invoice.retrieve(invoice.stp_invoice_id, api_key: Setting.get('stripe_secret_key'))
|
||||
next if invoice.amount_paid == stp_invoice.total
|
||||
|
||||
puts "Id: #{invoice.id}, reference: #{invoice.reference}, stripe id: #{stp_invoice.id}, " \
|
||||
|
Loading…
Reference in New Issue
Block a user