I have an app where i am trying to integrate stripe api. While following a certain tutorial i managed to configure my stripe keys as shown below.
In config/application.yml (figaro)
development:
stripe_secret_key: sk_test_******************
stripe_publishable_key: pk_test_******************
production:
stripe_secret_key: sk_test_******************
stripe_publishable_key: pk_test_******************
Then in config/initializers/stripe.rb i have
Rails.configuration.stripe = {
:publishable_key => ENV['stripe_publishable_key'],
:secret_key => ENV['stripe_secret_key']
}
Stripe.api_key = Rails.configuration.stripe[:secret_key]
Everything works fine in development, however, when i deploy my app to heroku i get the error "You did not set a valid publishable key". Can someone advise, what is it i am doing wrong? I am still working with test mode.