Integrating PayTrace and Salesforce using Chargent
This guide contains instructions for integrating your Salesforce.com environment with the PayTrace payment gateway — using the Chargent payment processing plug-in.
Click a link to go directly to one of these sections:
- Obtain a PayTrace Sandbox Account
- Configuring Salesforce for PayTrace Integration
- Setting up PayTrace with the Gateway Setup Wizard
- To Manually Setup Your Gateway
- Direct Debit Network
- Testing the PayTrace Integration
- ACH Validation
- Sending Live Transactions from a Salesforce Sandbox
- Understanding Transactions
- Correspondence in the Transaction Fields
- Going Live
- Transaction Sync
Connect PayTrace and Salesforce with Chargent
See all PayTrace transactions, manage refunds, send payment links and more, all inside Salesforce with Chargent, the top rated payments app on the Salesforce AppExchange.
Not yet a Chargent customer?
Contact us for a no-obligation 30 day trial, and see for yourself!
PayTrace Inc. is motivated by the challenge of delighting merchants. They empower sales partners by offering high value SaaS technology solutions to businesses. Processing over $22B annually, PayTrace is committed to delighting merchants with 5-star service while providing comprehensive, easy to use payment solutions that lower processing costs and increase security.
Using the step-by-step instructions in this guide, it’s easy to connect Salesforce to the PayTrace gateway with Chargent Payment Processing Chargent has many features to offer, including automating and streamlining Salesforce payment processes, easy subscription management, click-to-charge buttons, payment request emails, and more.
Integrating PayTrace with Chargent gives you the ability to easily build a seamless process for completing payment for orders that you manage in Salesforce. The integration connects the PayTrace gateway directly to Salesforce.
Obtain a PayTrace Sandbox Account
The first step is to get a test account from PayTrace so that you can run test transactions from Salesforce.
To request a sandbox account, complete the form on the Sandbox Account Request page.
- Temporary Password to confirm the account
If you need any help, contact PayTrace through their Support page, email at [email protected], or by phone at 888-806-6545.
Once you have confirmed your PayTrace account you need to make yourself an API User. The sandbox account currently defaults to Web User so you can only do web transactions.
- Login to PayTrace
- Select Users
- Make sure you select yourself as the User
- Change to API User instead of Web UserNote: Changing this will no longer allow you to access the Sandbox account via your web browser. It will however allow you to use the API integration with Chargent through Salesforce. Contact PayTrace if you need this switched back for some reason although switching it back will break the integration.
Production account: You’ll also need to register for a production account. Use the contact information in the enrollment email messages to work with PayTrace Support and obtain the same set of credentials for your production account.
Configuring Salesforce for PayTrace Integration
NOTE: You must get each of these gateway credentials from PayTrace before moving on to the steps in the next section, Configuring Salesforce For Integration.
- The steps in this section are written with the assumption that Chargent has not already been installed into your Salesforce account.
- Before moving on to the procedure below, you must successfully complete all of the steps given in the previous section, Obtain a PayTrace Sandbox Account.
Follow the steps below to configure Salesforce to integrate with PayTrace:
- Contact AppFrontier Support to assist with the installation of Chargent in your Salesforce Org.NOTE: Both the Sandbox and Production installations of Chargent include a free, 30-day trial license.
- Complete the basic Chargent setup, such as assigning user licenses and updating page layouts. For more information, please consult our Quick Start Guide.
If you’ve just updated the Chargent package from a previous version you will need to activate the Remote Site for PayTrace:
- Go to Salesforce Settings
- Search for Remote Sites
- Click Edit next to PayTrace
- Check the Activate box
- Save the Remote Site
Setting up PayTrace using the Gateway Setup Wizard
- Click the AppLauncher icon on the top left of Salesforce and
- Select Chargent from the list of Apps (your Apps may appear in different order than the screenshot)
- Select Chargent Settings and Chargent Setup Wizard
This will walk you through the Gateway Setup Wizard
- Do you have a Payment Gateway account? – Select Yes
- Select PayTrace from the dropdown menu and press Continue
- Enter your PayTrace Credentials
- Choose Test if you are setting up your gateway to test transactions in your Sandbox
- Choose Live if you are setting up your gateway to do live transactions in your Production Org.Note: For security purposes, Chargent typically requires use of the Endpoint Override field in order to send live transactions from a Salesforce Sandbox. (This is typically recommended as a final step prior to deploying to production). However, PayTrace has the same server endpoint for both test and live transactions: https://api.paytrace.com. It is therefore recommended to use caution when submitting test transactions to ensure that they are not accidentally sent as live transactions.
Note:You can only setup one gateway at a time.
- Use Tokenization? Yes (recommended for PCI compliance and recurring payments)
- Select what payment methods you accept
- Setup Payment Console (Payment Console is a Platform Edition Premium Feature)
Direct Debit Network
Starting with Chargent version 6.15, you can now select the Bank Account network for your region during the gateway setup process. Cybersource uses the ACH Network. This will allow for the correct Direct Debit Network fields to be displayed on Payment Requests and Payment Console based on your region.
You should choose ACH – US as the network. ACH is also known as echeck or electronic check.
Once you have your Direct Debit Network set, you will see the appropriate field names on your Payment Request that are sent as well as your internal Payment Console.
Testing using Chargent Anywhere
Testing with Payment Console
To test using the Payment Console, you want to navigate to any record in your Sandbox that has the Chargent Anywhere Component enabled.
- Click the [PaymentConsole] button
- If you are using multiple gateways select your gateway from the dropdown otherwise continue to step 3
- Enter all the Billing Information and click [Next]
- Enter in a test credit card number, expiration date, and CVC code based on the Cybersource test credit cards below. If you are testing ACH you can use the Cybersource Bank Account test numbers.
- Click the [Charge] button.
You should receive a green box showing Approved.
Testing using Payment Request
To test using a Payment Request you want to be sure you have the Chargent Payment Request feature set up as outlined in our documentation.
- Click the [Send Payment Request] button
- If you have multiple Payment Request templates set up you will first choose what template you want to use.
- Enter an email address where you want to send the test Payment Request along with any amount.
- Enter a Contact name (Optional)
- Click the [Send Request] button
When you receive the email, click the secure link for the Payment Request. Use one of Cybersource Credit Cards or bank account testing numbers to complete the payform and submit the payment.
You should receive a green box confirmation.
The ACH Validation feature works with Lyon’s ACH Validation service to validate the bank account, and store the validation in your Salesforce Org. During your Gateway Setup you will authenticate your Lyon’s credentials and Chargent uses a referral relationship for all first-time transactions.
If you are not using Lyon’s ACH Verification you want to disable this.
If you are using Lyon’s ACH Validation you will enter the following credentials.
- Company ID
Note: If you are testing in a Salesforce Sandbox or Developer account, you want to be sure to check the ‘Test Transactions Only’ box.
- Enabled: this setting will enable or disable the ACH Validation.
- Company Id: The company Id in Lyons validation.
- Username: Username to log in Lyons validation.
- Password: Password to log in Lyons validation.
- Test Transactions Only: If this setting is checked, you will send all validations, through a test gateway.
In case you decide to turn off ACH Validation, you will see this warning message.
On the other hand, when you edit the gateway, in “Advanced Settings” you will see this new checkbox, Allow “No-Hit” Transactions.
A “no hit” ACH Validation Response is neither positive or negative. It indicates that ACH validation couldn’t be completed as this account is not listed in the reference database at this time.
On failure validation you will receive this message
NACHA validation, when enabled and correctly configured, applies to all Orders with Bank Account payment method and ACH as Bank Account type in the related gateway.
The only exception to the above mentioned rule is for orders with already-approved transactions, with the same Account Number last 4; these Bank Accounts are treated valid without using the Lyons service.
In case that there was an error from Lyons service the transaction will continue as usual but this Bank Account will try to get validated again on the next transaction.
If the transaction doesn’t count with the necessary information to get validated because of the tokenization will count as a valid transaction, without the ACH validation
PayTrace Credit Card Numbers
As shown on the PayTrace Testing Information page, these are valid test credit card numbers. Test credit card numbers should be used for sending transactions to your PayTrace test account.
|Card Type||Card Number||CSC|
Below are the valid Account Number and Routing Number for PayTrace. This will help you test ACH (Electronic Check – Direct Debit) Transactions.
|Account Number||Routing Number|
For PayTrace, submission of $0.50, $1.00 or a higher amount (except $1.12, $1.13) should give an approval response. Amounts such as $0.20, $0.21, $0.29 will cause the return of a DECLINE message. The full list of testing amounts can be found on PayTrace Testing Information page in the Testing Amount section.
Expiration dates in the future are returned as valid; expiration dates in the past are returned as invalid.
Sending Live Transactions from a Salesforce Sandbox
All PayTrace transactions are sent to the same endpoint (https://api.paytrace.com). You want to use caution when testing to make sure you are using your test credential gateway setup, because real transactions will process the same as the test credit card numbers provided by PayTrace.
When a transaction occurs between Chargent and the PayTrace gateway, a new transaction record is created in Salesforce. The listing of transactions can be found in the Transaction section near the bottom of the Chargent Order page. See the figure above.
On the order page, go to the Related tab and click a Transaction ID link to see the details, as shown below. This transaction record contains the entire set of data that PayTrace sends in its response, including transaction Type (Charge, Authorize, Refund or Void), the Response Status (Approved, Declined, Error), and any related approval or error messages.
You can compare the transaction records in Salesforce with the records in your PayTrace administrative app. As shown in the figure below, click the Dashboard menu category, then click View Transactions. Then click the link for a specific transaction to view details.
From the Transaction Record in Salesforce copy the Gateway ID. You can paste the Gateway ID in the search field in PayTrace to locate the transaction.
Correspondence in the Transaction Fields
The Gateway Date is the timestamp for the submission to PayTrace, and the Gateway ID field corresponds to the PayTrace Transaction ID for use in reconciliation between two systems.
This table contains the mapping information between PayTrace and Salesforce fields.
|Salesforce field||Direction||Gateway field|
|Gateway ID||<||Transaction ID|
|Invoice Number||>||Invoice ID|
|PO Number||>||Customer Reference ID|
This section contains the procedure for configuring the integration in a production system.
NOTE: Do not proceed here until the testing procedure described in Testing the Integration is successful.
- First, obtain the production credentials for the PayTrace production gateway account (similar to the method given for sandbox credentials in Obtain a PayTrace Sandbox Account.
- Get these production credentials from your enrollment email message:
- Repeat the steps in the Configuring Salesforce for PayTrace Integration section above, but substitute the production credentials.
- Repeat the steps in the Testing the PayTrace Integration section above with respect to the SalesForce production environment, using the production credentials.
- Void the transactions: If you’re using an actual credit card and want to prevent the charge from settling, remember to void the transaction after testing.
- Be sure to successfully transmit at least one real credit card transaction using company or personal accounts. We recommend that you submit a transaction with a very small amount and then void that transaction afterwards. This ensures that the system works with your production credentials.
Chargent has always sent charges and authorizations to the payment gateways, and recorded the result in a real-time Transaction in Salesforce. Chargent can also update Salesforce records long after the initial transaction—for ACH transactions that are returned for non-sufficient funds (NSF), credit card authorizations that expire, and more.
Two fields, Transaction Status and Settlement Date can now be updated through a daily scheduled batch in Salesforce.
Possible values of the Transaction Status are either final or non-final. It the status is final, then no more updates will occur for that transaction. Also, batches will not pick up any transaction having a final status.
The Settlement Date field stores the date and time when the Transaction Status is changed to final (such as “Settled” or “Voided”), after which it will no longer receive any updates.
To schedule the batch, navigate to Setup > Develop > Apex classes, and then click the Schedule Apex button. These are the batch names:
The following are the various transaction status values for PayTrace Transactions. Use some of the values to learn when a transaction has been declined, and take appropriate action within Salesforce—such as sending an email or assigning a follow-up task.
- GB or Settled (and batch number appended)
- Batch number itself