Hey Chris - I signed up for your payments with Stripe course and "Creating The Checkout Form With Stripe.js" section is really confusing. Basically video three on the New Stripe JS element does everything the followng three videos do, but the codiing is a little different?
Can I just use the content from video three?
Let me know if you run into any troubles!
Thanks for the quick response Chris. I will defintely let you know if I have have any follow up questions.
On an unrelated note, I am using the Windows Subsystem for Linux with PostgreSQL installed on the Windows side. This means I can't access the Heroku database by running heroku psql in bash. Do you know of any work around for this?
The local psql command could not be located. For help installing psql, see https://devcenter.heroku.com/articles/heroku-postgresql#local-setup
I would probably just install the Heroku CLI on Windows as well to solve that problem. Then you can access that from Windows until it's finally stable to run on the Linux subsystem.
Hi Chris - Quick update, I am just getting back to this course and I've updated my Rails app to 5.2.
I am on the "New Stripe Elements Video" and trying to call my credentials from the application file.
Therefore, I am just wondering how to correctly call my credentials from config/credentials.yml.enc. Currently I have:
<%= tag :meta, name: "stripe_key", content: Rails.application.credentials.development[:stripe_publishable_key] %>
This is working but should I do an if else statement for production vs development?
This is the content of the my credentials file:
I would just use Rails.env in your line there to make it dynamic. Should be something like this:
<%= tag :meta, name: "stripe_key", content: Rails.application.credentials[Rails.env][:stripe_publishable_key] %>
Join 27,623+ developers who get early access to new screencasts, articles, guides, updates, and more.