I am doing some development involving the Stripe API. In my development environment I am using my stripe test key. In production I am using the real api key so that I can process real transactions of course.
I am currently just changing out the test api key immediately before I deploy to my production environment; this does not feel very good. A strategy that I am pretty sure would work is to just make a development branch with a gitignore (ignoring my initializer that loads the api key) and then just merging it with the master branch before I deploy; this way the api keys would always be correct in their respective environments. I don't really like this approach though. Is there some sort of way to configure these api keys somewhere so that the app just knows which one to use when in dev/prod?