I'm working on a script that uses the Strip REST api with the PHP SDK. I was hoping to be able to replicate the production data in the test environment. Is this possible?
Thanks,
Andrew
To my knowledge there's no way to directly port production data into the test data. However a simple script can be constructed to iterate over production data, grab the necessary attributes, switch to test API credentials, and create the necessary records.
I've done this in an idempotent way so that it can be done anytime we add something to Stripe in production, we can create a mirror of this object in our own data model for both production, development, staging, and make sure the item exists in Stripe's test environment.
As I found, you need to write the script and change flag "livemode" to false. That might convert production data to test data. Stripe does not offer to this directly. You can see the flag desciption in below image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With