0

I had Stripe Connect working in development / test environment, however I am having issues when pushing live to production, receiving the following JSON error:

{
error: {
message: "No application matches the supplied client identifier"
}
}

I am using RoR, with Devise, and Figaro. I admit that there is some confusion between the differences of both my config/locales/secrets.yml, and config/locales/application.yml

My devise.rb is shown below:

if Rails.env.production?
  Rails.configuration.stripe = {
    publishable_key: ENV[ 'STRIPE_PUBLISHABLE_KEY' ],
    secret_key:      ENV[ 'STRIPE_SECRET_KEY' ]
  }
else
  Rails.configuration.stripe = {
    publishable_key: 'pk_test_abcdefghijklmnopqrstuvwxyz',   Not Real...
    secret_key:      'sk_test_abcdefghijklmnopqrstuvwxyz'
  }
end

Stripe.api_key = Rails.configuration.stripe[:secret_key]

In my application.yml, I have:

STRIPE_CLIENT_ID: (live key here....)
STRIPE_SECRET_KEY: (live key here....)
STRIPE_PUBLISHABLE_KEY: (live key here....)

In my secrets.yml, I have:

development:
  secret_key_base: key.....
  stripe_publishable_key: key.....
  stripe_secret_key: key....
  stripe_client_id: key....

test:
  secret_key_base: key.....

production:
  secret_key_base: key.....
  stripe_publishable_key: key.....
  stripe_secret_key: key.....
  client_id: key.....

Any help or suggestions would be hugely appreciated.

Cheers,

  • The `development` blob in `secrets.yml` sets `stripe_client_id`, but `production` sets `client_id`. Is that a mistake? – Kristján Mar 20 '16 at 18:48
  • It has all become a bit of a confusing mess, I have tried conforming naming conventions to be stripe_client_id and client_id, in development and production of secrets.yml, no luck with either. Thanks for your comment though. @Kristján – Darragh Monaghan Mar 20 '16 at 19:17

0 Answers0