Before You Begin #
Your payment gateway handles all transactions through Salesforce. To set up your payment gateway within Chargent, you’ll need the following information:
- The name of the payment gateway you will be using
- Test login or live login credentials – (If you are looking to do live tests from your Salesforce Sandbox you will need to also use the Endpoint Override URL)
- Will you be using Tokenization (recommended)?
- What currency will you be using
- Will you be using the Payment Console (Platform Edition and above)
- Which payment methods will you be accepting (such as Visa, Mastercard)
- Will you be doing bank debit transactions?
- Will you be doing subscription billing?
Setting Up Your Gateway #
Chargent simplifies configuring your payment gateway in a wizard that walks you through each step.
- Click the App Launcher icon at the top-left of your screen and choose Chargent.
- Select the Chargent Settings tab and the Chargent Setup Wizard subtab.
- Follow the prompts to configure your gateway.
Gateway Wizard Errors
If you receive an error message stating “Credentials you provided are not valid. Please check and try again.” this means one of the following things:
- Your gateway credentials are invalid or expired, please check them again.
- You are using test credentials setting up a live gateway.
- You are using live credentials setting up a test gateway.
- The Remote Site Settings for your payment gateway are not active. Go to Setup > Remote Site Settings, locate the URL(s) related to your gateway, and make sure the Active checkbox is checked.
If your gateway is not listed it may be supported via the Authorize.net emulator. Please see our list of supported gateways on our Gateways page. If your gateway is supported using the Authorize.net emulator you will want to also make sure the endpoint override is added to the Remote Site settings.
- Click the gear icon and choose Setup in Salesforce
- In the search window enter Remote Site
- Click the New Remote Site button on the top
- Enter the following
- Remote Site Name (this is generally your gateway name)
- Remote Site URL (this is the Endpoint Override you would have used in setting up your gateway).
- Disable Protocol Security (Do not select this unless you understand the security implications. See the Salesforce help on this for more information.)
- Click Save
Payment Gateway Guides #
Chargent allows you to integrate with more than 30 payment gateways. After setting up your payment gateway inside Chargent, review the setup guide for your chosen gateway.
Field History Tracking #
Salesforce’s Track Field History feature provides a useful audit trail for reviewing or troubleshooting past changes. Changes to tracked fields are displayed in the History related list. You can track up to 20 fields per standard or custom object, and the data is retained for 18 months.
AppFrontier recommends that you enable history tracking on key fields on both the Chargent Order and Transaction for auditing purposes. This way you will be able to review when a field was updated, and its before and after values, should there be questions in the future.
Enabling History Tracking
- Click the gear icon and choose Setup
- Select the Object Manager tab
- Select Chargent Order
- Click Fields & Relationships
- Click the Set History Tracking button
Note that if you have not previously enabled history tracking, the button may say Enable History Tracking, and you will need to check a box to enable it on the following screen
- Select the fields you wish to track
- Click Save
You may also need to add the Field Tracking History to the Page Layout as a Related List.
- Click the gear icon and choose Setup
- Select the Object Manager tab
- Select the object you want to track fields (recommended fields on the Chargent Order are listed below).
- Click Page Layouts
- Click the Page Layout that you want to add Field Tracking History.
- Under Related Lists drag the Field Tracking History to the Page Layout.
- Click Save
Recommended Fields to Track
The 20 fields you will want to track will depend on your organization and how you are using Chargent. If you are doing ACH instead of Credit Card transactions, for example, you will want to select the bank fields, and if you are not doing recurring transactions you may not wish to select those fields. You may also wish to track other standard or custom fields on an object that may be unrelated to Chargent, which will reduce the number of Chargent fields you can track.
Here are our starting recommendations for Chargent fields to track:
Chargent Order Object
- Charge Amount
- Manual Charge
- Billing First
- Billing Last
- Billing Address
- Billing Email
- Card Name
- Card Number
- Card Expiration Month
- Card Expiration Year
- Charge Date
- Payment Frequency
- Payment Method
- Payment Status
- Payment Start Date
- Payment Stop
- Response Status
Note that most fields on the Transaction record should not be edited, and users may not have permissions to change fields depending on how you have configured Chargent.
Gateway Fields #
Active: Enables a Gateway record to be used, in the same way that other parts of Salesforce have an Active checkbox. You may wish to have multiple gateway records, especially if you have a separate test account, and keep some deactivated.
Test Endpoint: Test Endpoint sends transactions to a separate test server or sandbox environment, which cannot be used for live transactions. We recommend testing with Test Endpoint checked and your test credentials, until you are ready to capture live transactions.
Note: If Chargent is installed in a Salesforce Sandbox, for security purposes all transactions are sent to the test endpoint, whether or not this field is checked.
Endpoint Override: This field enables you to enter a custom URL to send transactions to. It is primarily used for payment gateways that run Authorize.net emulation on their own server URLs. It is also required if you want to send live transactions from a Salesforce sandbox account, as a final step in your testing. For security purposes, Chargent sends all transactions to the test account from Salesforce sandboxes, regardless of whether “Test Endpoint” is checked or not. Note that for Endpoint Override to work, the domain must be added under Salesforce’s Remote Site Settings first.
Debug: Debug can be useful for troubleshooting and verifying the values being sent to the payment gateway, but should only be enabled temporarily. It displays the complete XML or HTTPS request that is being sent to the server and response strings in the popup window when you click the appropriate button on your screen (Charge, Authorize, etc.). Note: This feature should only be used by System Administrators or trusted users as it may contain decrypted payment data!
Note: This feature should only be used by System Administrators or trusted users as it may contain decrypted payment data!
Require AVS: prevents the transaction from being submitted to the gateway without billing address fields being populated. Generally AVS settings are controlled through your payment gateway, but this will prevent Chargent from sending the transactions at all if the address data is not present in Salesforce.
Require Card Security Code: The Card Security Code (CSC, or CVC) is required when processing a charge using the Charge button. When you charge a transaction you will have a pop-up requesting a CVC code. If the Require Card Security Code is checked, then you must enter in a CVC in the pop-up otherwise you will receive a message saying it’s required.
Note: This is only when using the Charge button and does not affect Recurring Billing.
Use Tokenization: should be checked in gateways that support it if you wish to use stored tokens. If the checkbox is unchecked, credit card numbers will be used for transactions.
Accounting Seed Integration: enables the integration with the Accounting Seed accounting software for Salesforce when checked.
Gateway Response: Stores the entire response from the gateway. The same data that debug mode shows in a popup, but the credentials and credit card data is masked.
Credit Card Handling: Allows you to choose if/how credit card data is stored in different scenarios. For PCI Compliance reasons, many customers do not wish to store credit card data. The options are as follows:
- Never Clear: Chargent will not remove any card data automatically.
- Clear After Successful Charge: Chargent will clear the credit card number, expiration dates and card security code only after a successful charge is run.
- Clear After All Transactions: The credit card number, expiration date and card security code will be erased after any transaction (Charge, Void, Refund)
- Clear When Token Present: Only when a token is present in the token field, will the credit card number, expiration date and card security code be cleared. (Recommended)
Chargent supports multiple active gateways. If only one gateway is active, it will be used for each payment transaction. When multiple gateways are active, populate the Gateway lookup field with the desired gateway record for each Chargent Order record.
Many customers use Chargent’s multiple gateway functionality to keep payments for different business entities separate while using a single Salesforce account, or for supporting multiple geographies / currencies that might require multiple payment gateways.