After you have completed basic testing with a Developer or Sandbox account, it is critical to test with live transactions prior to rolling out in a Production environment.
Not all features and scenarios can be fully tested with test transactions, even if you are following along with your payment gateway’s recommended tests and expected responses. For example, Address Verification Service (AVS) cannot be fully tested on most payment gateways, so transactions that were approved in test could be declined when live. Many gateway test environments also do not behave the same as live when it comes to fraud filters, refunds, etc. It is best to work any issues out before going live.
As a security precaution, when running in Sandbox, all Chargent Payment Gateway records are designed to send transactions to the test payment gateways, regardless of whether you set them up as test or live. The Test Endpoint checkbox field is effectively disabled, so transactions are always sent to a test endpoint whether it is checked or not.
There is a workaround, however, for when you want to run real credit card transactions at the end of your testing, prior to going live.
Note: If you are using a Full or Partial copy sandbox, your data, batches, and gateways (including any value in Endpoint Override field) will be copied from your Production org. Ensure you disable the Recurring Billing Batch to make sure no accidental live transactions are processed.
How to Test Live Transactions in a Salesforce Sandbox
Create a new Gateway in your Sandbox using your live login credentials and add the Endpoint Override URL to the Endpoint Override field.
- Click the App Launcher and select the Chargent App
- Click the Gateways tab
- Click New
- Walk through the steps to set up a new gateway using your live gateway credentials
- In Sandbox, you will not have the option to choose between live or test
- Add the correct URL in the Endpoint Override field.
- You can find the correct Endpoint Override URL in your gateway’s Setup Guide.
Update the new Gateway record, setting the Test Endpoint checkbox to unchecked.
- After creating the new gateway, revisit the Gateways tab
- Click your new gateway record
- Click Edit
- Click Advanced Settings
- Uncheck the Test Endpoint checkbox
- Click Save
Test your Live Transactions in a Sandbox:
- Use your own credit card or a company credit card
- Charge a small amount, such as $1 or $5
- Go to the created Transaction record
- Click Void
- If voided the same day, the transaction will not settle and should not appear on your statement or deduct funds from your account
- Live transactions will incur per-transaction fees (typically 10 to 30 cents/transaction).
If you are looking to test live transactions in your Salesforce Sandbox account, you will need to add the Endpoint Override to your Gateway setup. Developer account’s you just need to uncheck the Test Endpoint checkbox. For the correct Endpoint override you can view our documentation for your specific Payment Gateway or contact your gateway for this information.
For more information on testing phases, parallel systems, and contingency plans, please see our guide: Testing Salesforce Financial and Billing Systems