Dec 6, 2020
0
Level 8
Cashier: How to set up your testing environment stripe keys
I am currently learning how to integrate Cashier into my app and I am now trying to write some tests. In the docs for cashier, it states that you should add
<env name="STRIPE_SECRET" value="sk_test_<your-key>"/>
to your phpunit.xml file. Why is this necessary if I already have the testing secret key in my .env? Is this to prevent the real key from being used if someone runs the tests on production?
And what is the proper way to add the above code to my phpunit.xml file? Doing the above would publish the key to my git repository.
Please or to participate in this conversation.