diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eb0526b2..2fb738a9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/tasks/fablab/stripe.rake b/lib/tasks/fablab/stripe.rake index 8fa685318..3b88fa376 100644 --- a/lib/tasks/fablab/stripe.rake +++ b/lib/tasks/fablab/stripe.rake @@ -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}, " \