I'm integrating Stripe into a site built on a CakePHP 1.3 installation and am using the Stripe AIP integrated into CakePHP as a simple Component. I have it working pretty well so far but would like to have my code sense if the Stripe account is in test mode and then use the appropriate API key.
Is there a flag somewhere in the Stripe API that look at? Or am I just going about this the wrong way and need to think about this differently? I'm open to guidance on the whole Stripe/CakePHP integration. It's very different than PayPal and I'm liking it a lot so far.
Changing the mode in the Stripe Dashboard doesn't enable/disable test mode. Both live mode and test mode are active at the same time. You choose which mode you interact with by using either the test API key or "live" API key.
You can verify it by enabling "live" mode in Stripe dashboard, and then using "test" API key to create a PaymentIntent. When you switch back to "test" mode in Stripe dashboard, the PaymentIntent you just created will be there.