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

  1. Go to your payment sets settings in the Foxy admin
  2. Under select a payment set, select Add a New Payment Set.
  3. You can call it test Payment Set (or whatever name you prefer), and click Add New Payment Set to save.
  4. Next, go to the payment section in the Foxy admin
  5. Under select a payment set, select the new payment set that you just created.
  6. Ensure that the which servers do you want to use? setting is set correctly - if you're wanting to run test payments only, it should be set to Test Servers
  7. Check the box next to Let customers pay with a Credit or Debit Card. A dropdown list will appear.

    Note: If this is already checked, double-check that your new payment set from in step 5 is selected ― otherwise, you might be changing your store's live payment set.

     
  8. In the bank card payment method dropdown, select your desired gateway. You can use Authorize.net if you want to use a Foxy test account.
  9. Enter your gateway credentials or check the use default test account checkbox if you're using Foxy's default test credentials for testing.
  10. Click Update Payment Gateway to save.

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.

  1. Go to the template sets section in the Foxy admin
  2. In the select a template set dropdown, select Add a New Template Set.
  3. Enter a code for your Template Set, for example test. The description can be whatever you like.
  4. Under the payment set dropdown, select the payment set you created above. Ensure the locale is configured to one with a currency that your gateway can support.
  5. Click Add New Template Set to save.

Testing the new Template/Payment Set

Finally, your new Template Set is ready to use.

  1. Modify the following link using your own store's domain in place of example.foxycart.com, and update the template_set=test portion, if you set your Template Set code to something other than test when creating it earlier:

    https://example.foxycart.com/cart?template_set=test&redirect=/
     
  2. Copy and paste the modified link into your browser's address bar and load it. You'll be taken to your store. The link will direct Foxy to use the test payment method you just created for checking out. This only changes it for the current cart session in your browser ― the customers will still be directed to the live payment.
  3. Add products to the cart as normal and go to checkout.
  4. For a test gateway, you may be able to use the credit card number 4111111111111111, any expire, any CVV number. If that doesn't work, you can search online for test payment card numbers for your gateway, or reach out to Foxy support for help.

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=/

In This Article

Related Articles

Site24x7 Synthetic Transaction Monitoring
Opening the Browser Developer Console

Need help?

Can't find the answers you're looking for? Our team is here to help. Please click below to contact us.

Contact Us