4 min read • Updated a month ago
Create a Payment Set for testing transactions on an active store
This article walks you through creating a test Payment Set and then completing transactions through that payment set for Foxy version 2.0. This allows you to test your checkout (you may be testing new code on the store or trying out a new gateway) while not interfering with your live store. While this article discusses using a test account (where live payments will not be processed), you can also use it with a live account. If not using Foxy's testing credentials, you'll need to get sandbox or test credentials from the gateway.
This article assumes that you are not currently using the template_set
parameter on your store.
There are other uses for payment sets, so reach out if you have a need for using different gateways in different situations.
Here's how to set it up:
Create a Payment Set
After it's saved, just to check things out, you can select the dropdown for select a payment set. If you select Default Payment Method Set, you should see the configuration for the normal ordering gateway.
Create a Template Set
Now, you need to create a Template Set that you can use to direct Foxy to process the "payment" using the gateway configured in your new Payment Set.
Testing the new Template/Payment Set
Finally, your new Template Set is ready to use.
Note that you can view your test transactions in the Foxy admin transactions report section by selecting a transaction type of test in the transaction filter criteria.
Don't worry if you accidentally get to the live Payment Set in the checkout and type in the test card number above ― it'll fail with that number on a live gateway.
Resetting the Template Set in the cart
Once you're satisfied with your tests, you can return your cart session back to the default template set but using a link like this - again updating the example.foxycart.com
subdomain to your own Foxy store subdomain:
https://example.foxycart.com/cart?template_set=DEFAULT&redirect=/