The next step allows you to test a single transaction or to set up Recurring Billing. When you click to the next page you can enter in the credit card number and the test information provided by your gateway. Click the charge button to complete the transaction.
If everything was set up and entered correctly, you will see a green approval message showing the success. This will also create a Transaction record that is now associated with the record which you originally processed the payment from.
If you are not using Chargent Anywhere, you can complete similar tests using the classic Payment Console or the Charge button located directly on the Chargent Order record.
Test Credit Card Numbers
Payment Gateways provide special test credit card numbers for testing purposes. It is important to note that these test credit card numbers will work in test gateway accounts, but will not work on your live gateway account.
Similarly, you generally cannot use real credit card numbers for testing on the test gateway accounts.
Two Visa test credit card numbers that are easy to remember are:
4111 1111 1111 1111 (four + 15 ones)
4242 4242 4242 4242 (42 eight times) – – a Visa card has sixteen digits
Use any Expiration Date in the future and any 3 digit card security code, unless your gateway requires a specific card security code when testing, such as the PayTrace Gateway.
Your payment gateway will also provide you with additional test credit card numbers (and test bank account numbers, if applicable).
Please see Chargent’s individual gateway guides for more information on test credit card numbers.
Some test payment gateways use the amount that you send for a test transaction to determine the response message that you receive.
This is designed to allow you to receive all of the different responses, which is actually not required since Chargent has already completed the integration between Salesforce and your payment gateway.
It is important to understand this, however, to save yourself some frustration of repeatedly receiving a decline message from a test gateway, based on the amount you send, but thinking that you are unable to get an approved transaction.
Here are some examples:
- With the Authorize.net Gateway, using an Amount of $70.02 or the Zipcode 46282 will generate declined transaction responses.
- For the BlueSnap and Braintree Gateways, certain test credit card numbers will generate failure or unsuccessful card verification responses.
- For the NMI Gateway, to generate a declined transaction, pass an amount that is less than $1.00.
- Finally, for the PayTrace Gateway, a submission of $0.50, $1.00 or a higher amount (with the exception of $1.12, $1.13) should result in an approval response. Amounts such as $0.20, $0.21, and $0.29 will result in the return of a DECLINE message.
No need to worry about remembering these details, we just wanted you to be familiar with the concept. Full details and links to the larger testing documentation for each Gateway is available in Chargent’s gateway guide for each specific integration.
ACH and Direct Debit Transactions
ACH, also known as electronic check, echeck, or direct debit (for our friends in Australia) can also be tested for most gateway integrations. Please check out Chargent’s individual gateway guide for your gateway to see if ACH is supported.
If your payment gateway supports ACH and Direct Debit, then you should also find test bank account details such as a test Routing Number, a BSB Number, and an account number.
When testing using the Payment Console you want to make sure you select Bank Account instead of Credit Card as the Payment Method. From the Chargent Order, choose “check” in the Payment Method Field for bank account transactions.
Testing in Your Salesforce Production Org
When testing in your Salesforce Production org, you can choose either a live gateway or a test gateway setup. Unlike the Salesforce Sandbox, keep in mind that live gateways in Production Orgs will send the transactions to a live endpoint, which means processing real transactions.
This means you may want to set up a new gateway using your test credentials, making sure that you select Test in the setup wizard. This will allow your test transactions to go to a test environment of your gateway.
IMPORTANT: Before going live with your Chargent system, you need to test a few live transactions, using your own credit card or bank account.
This is critical because payment gateway test environments are not always a 100% accurate reproduction of the live environment. If you have a new payment gateway account, this will also allow you to verify that it is set up correctly and all features (such as accepting American Express, tokenization, ACH and Address Verification Services) have been properly activated by the payments provider.
Live gateways will require real credit card / bank accounts for testing, they will not work with test credit card numbers. Simply charge small amounts, such as $1. Don’t worry, you can void the transactions afterwards and never see it on your credit card statement.
If you have set up test gateways in your Salesforce production org, we recommend setting them to inactive before going live, to make sure that they cannot accidentally be selected.
And that’s all you need to know for how to test payments in Salesforce!
If you missed part 1 of this series, “How to Test in a Salesforce Sandbox”, check it out. It goes pretty deep on how to use Salesforce Sandboxes, and some things to watch out for.
Questions? We are always here to help.