- 23 Dec 2022
- 5 Minutes to read
- Print
- DarkLight
Testing
- Updated on 23 Dec 2022
- 5 Minutes to read
- Print
- DarkLight
Introduction
When setting up Blackthorn Payments, we suggest you connect your Payment Gateway in Test Mode so that you can create test Transactions, Payment Methods, and Customers.
In order to create successful test records in Salesforce, you must use the card and ACH numbers below and process through a Test Mode connected Payment Gateway.
Stripe
Stripe API Version
Want to test the latest Stripe API version before making the switch in your dashboard? Now define the latest version number on the Payment Gateway record, and you can verify that all the updates with the latest versions work with your current process in Salesforce.
An example of a version value is 2020-03-02. As seen here in Stripe's docs.
Testing Stripe Cards
Real card information cannot be used in Test Mode. Instead, use the following test card number, a valid expiration date in the future, and any random CVC number to create a successful Payment Method and Transaction.
- Card number: 4242424242424242
This number will create a successful card Payment Method that can be used to capture, authorize, and refund Transactions.
NOTE: Additional card numbers can be found in Stripe's testing documentation.
Testing Stripe ACH Bank Accounts
Real bank account information cannot be used in Test Mode. Instead, use the following test bank account numbers to create an ACH Payment Method and Transaction.
Successful ACH Payment Method
- Bank account number: 000123456789
- Routing number: 110000000
- Account holder type: Either option
After creation and with the newly created Payment Method's Status = "Pending", enter the micro-deposit amounts:
- Micro-Deposit One: 32
- Micro-Deposit Two: 45
This Payment Method is now Valid and can be used to capture and refund Transactions.
Failed ACH Payment Method
- Bank account number: 000111111116
- Routing number: 110000000
- Account holder type: Either option
This Payment Method is invalid and the error message will populate in the Stripe data fields.
NOTE: If you want to test failed micro-deposit verifications, enter any two numbers besides 32 and 45.
Testing for Specific Responses and Errors
The test cards below can be used to create a Payment Method that produces a specific response.
- Card number: 4000000000000127
When trying to create a Payment Method with this card number, an error will be thrown about a incorrect CVC code. The error message will populate in the Stripe data fields.
- Card number: 4000000000000341
A Payment Method with this card number will be Valid, but when capturing a Transaction with this Payment Method, it will fail. The error message will populate in the Stripe data fields.
Additional testing for specific responses and errors can be found here.
Disputes
In Test Mode, you can use the test card below to simulate a disputed Transaction:
- Card number: 4000000000000259
A Payment Method with this card number will be Valid, but when capturing a Transaction with this Payment Method, a Dispute record will be created.
Test Winning a Dispute
Enter the words "winning_evidence" in the Additional Information field on the Dispute Evidence record.
This will simulate the dispute being won and the funds being returned to your account as an adjustment Transaction.
Test Losing a Dispute
Enter the words "losing_evidence" in the Additional Information field on the Dispute Evidence record.
The dispute is closed and marked as lost. Your account is not credited.
Authorize.net
Testing Authorize.net Cards
Real card information cannot be used in test mode. Instead, use the following test card number, valid expiration date in the future, and any random CVC number to create a successful Payment Method and Transaction.
- Card number: 4111111111111111
This number will create a successful card Payment Method that can be used to capture, authorize, and refund Transactions.
NOTE: Additional card numbers can be found in Authorize.nets testing documentation.
Testing Authorize.net ACH Bank Accounts
Real bank account information cannot be used in Test Mode. Instead, use the following test bank account numbers to create an ACH Payment Method and Transaction.
Successful ACH Payment Method
- Bank account number: 000123456789
- Routing number: 122105812
- Account holder type: Either option
NOTE: For testing purposes, eCheck.Net transactions under $100 will be accepted. To generate a decline, submit a Transaction over $100. A monthly limit of $5000 is also configured in the sandbox. If you exceed this amount, your eCheck Transactions will fail with a "This transaction has been declined." error message.
Testing for Specific Responses and Errors
Create a Payment Method using the following Postal code to generate a declined Transaction.
- Postal code: 46282 - This transaction has been declined.
- Postal code: 46205 - The transaction has been declined because of an AVS mismatch. The address provided does not match billing address of cardholder.
To generate a decline for ACH, submit a Transaction over $100.
Create two Payment Methods with the same name and email address to generate A duplicate record with ID [auth.net id] already exists error for the second Payment Method.
PayPal
Test Card Number
Real card information cannot be used in Test Mode. Instead, use the following test card number to create a successful Payment Method and Transaction.
- Card number: 4755007800273033
- Expiration date: 05/2022
- CVV: 105
Spreedly
Spreedly has included test data in their documentation to help with your initial integration. This includes test credit card numbers and bank account values. We've provided a couple below. Check out the full list here.
Testing Spreedly Cards
Visa Credit Card
- Card number: 4111111111111111
Testing Spreedly ACH Bank Accounts
Bank Account
- Routing number: 021000021
- Account number: 9876543210
Deleting Test Data
Stripe
- Navigate to your Stripe Dashboard.
- Toggle "ON" the
View test data
switch. (left-hand column). - Click Business settings. (left-hand column)
- Select "Data".
- Next to Test data, click Delete all test data....
- Click Delete Now.
Salesforce
Whether you are in a Production or Sandbox Org, you will need to temporarily deactivate all triggers so that you can delete Transaction, Payment Method, and Payment Gateway Customer records.
- Navigate to Custom Settings.
***Lightning/Classic: *Setup > In the Quick Find type in and select "Custom Settings.
- Click Manage next to Blackthorn - Pay Trigger Settings.
- Click Edit.
- Check the Disable All Triggers checkbox.
- Click Save.
- Delete all of your test data.
- Navigate back to Custom Settings and UNCHECK Disable All Triggers.