This guide contains instructions for integrating your Salesforce.com environment with the Realex payment gateway—using the Chargent payment processing plug-in.
Click a link to go directly to one of these sections:
Realex Payments, a division of Global Payments Inc., is one of Europe’s leading providers of ecommerce payment solutions. Realex works with thousands of small to medium-sized businesses to enable them to scale their online business and expand their international reach. Over the past 16 years, Realex has established a strong reputation in the industry and amongst our customers for ecommerce expertise, payments knowledge, and dedication to excellent customer service.
Using the stepwise instructions in this guide, it’s easy to connect Salesforce to the Realex Payments gateway with the Chargent app. 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 Realex 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 Realex gateway directly to Salesforce. Chargent also supports Realex gateway tokenization for processing credit card payments. See Configuring Salesforce for Realex Integration for additional information on the gateways.
Realex Payments offers two types of transaction refunds, refunds and rebates. Rebate is the default type, and will refund money to the same credit card for the initial transaction. The refund amount limit for a rebate is 115% of the original transaction value.
If you want to refund any amount of money to any credit card any amount of money, choose the refund type. This is available in the custom settings. In the Chargent Settings tab, click the Advanced Settings tab and then check the box for Use RealEx Rebate Method.
Whitelisting: Keep in mind that Realex may need to whitelist Salesforce IP addresses for your account.
The first task is to get a sandbox / test account from Realex so that you can run test transactions from Salesforce. To being the process for obtaining a sandbox account, complete the form on the sign up page.
Upon approval, you’ll receive an email that contains these testing credentials:
Click the link in the email to go to the test test login page.
Login with your username and temporary password, and then follow the prompts to change your password.
Need help? Contact Realex through the options given on their Support page.
On your first successful login, you’ll get a prompt to enter a permanent password of your own choosing. Take note of any restrictions on the required strength of the password.
NOTE: You must get each of these gateway credentials from Realex before moving on to the steps in the next section, Configuring Salesforce for Realex Integration.
Follow the steps below to configure Salesforce to integrate with Realex:
|Gateway Page Field||Value|
|Gateway Name||Enter an easily recognizable name for this gateway, such as “Realex Test”.|
|Merchant ID||Merchant ID|
|Merchant Security Key||Realex Shared Secret and Refund Password, merged by a "@" symbol. Example: secret@refund"|
|Active||Check this box|
|Test Endpoint||Check this box|
NOTE: The Merchant ID, Shared Secret, and Refund Password are taken from your Realex introductory email message(s). See the section above, Get your Merchant Security Key.
This section contains the procedure for testing the integration that you set up according to the procedure given in Configuring Salesforce for Realex Integration, using your Realex sandbox credentials.
Follow the steps below to verify that the integration is correct.
See the figure below, which indicates Chargent Orders for the purpose of illustration. (If you installed the Chargent Opportunities or Cases package, you would use that object for testing).
|Card Type||Card Number||Comments|
|American Express||375425000000907||Referral A|
|American Express||343452000000306||Referral B|
|American Express||372349000000852||Comms Error|
|3D Secure||4012001038443335||Cardholder Not Enrolled ECI 6 **|
|3D Secure||4012001038488884||Unable to Verify Enrolment ECI 7 **|
|3D Secure||4012001036298889||Invalid response from Enrolment Server ECI 7 **|
|3D Secure||4012001036853337||Enrolled but invalid response from ACS ECI 7 **|
|3D Secure||4012001037141112||Successful Authentication ECI 5 **|
|3D Secure||4012001037167778||Authentication Attempt Acknowledged ECI 6 **|
|3D Secure||4012001037461114||Incorrect Password entered ECI 7 **|
|3D Secure||4012001037484447||Authentication Unavailable ECI 7 **|
|3D Secure||4012001037490006||Invalid Response from ACS|
See the figure below for the placement of these fields.
When Chargent is installed in a Salesforce Sandbox, transactions are always sent to the payment gateway's test / sandbox / development environment, regardless of whether Chargent's Test Endpoint checkbox is checked. This is done as a security precaution, to prevent real transactions from being accidentally sent from a Salesforce Sandbox.
When Chargent is installed in a production or developer Salesforce org, the Test Endpoint checkbox on the Gateway record will select between sending to the payment gateway's live and test environments. (There are a few exceptions, such as Stripe, which has a single endpoint to send transactions to, and different credentials for live versus test transactions).
If you wish to send live transactions from a Salesforce Sandbox, as a final step in testing, simply use Chargent's Endpoint Override field on the Gateway record, and enter the production endpoint of your chosen gateway there.
Here is the production endpoint URL for Chargent's integration with Realex:
Note that the full endpoint URL must be entered in the Endpoint Override field, and the domain must be present in the Remote Site Settings (for standard Chargent integrations it should be already present).
When a transaction occurs between Chargent and the Realex 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 (or Opportunities or Cases, if you are using those packages). See the figure above.
On the order page, scroll down to that Transactions section and click a Transaction ID link to see the details, as shown in the figure below. This transaction record contains the entire set of data that Realex 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 Realex dashboard. Login to the Realex test portal and click the Batched link at the top. See the figure below.
You’ll see a transaction listing similar to this one.
Locate the transaction of interest in the listing, and click on the transaction row, then click again on the item of interest on the next page to see the details for that transaction.
The Salesforce Gateway ID is the Realex Pas Ref combined with the Realex Order ID, with an underscore between them.
This section contains the procedure for configuring the integration in a production system.
In the same email that contains your credentials you also find a Shared Secret and Refund Password, merged by a "@" symbol (for example, “secret@refund) This is the value for Merchant Security Key in Salesforce.
Production account: You’ll also need to register for a production account. When you’re ready, use the contact information in the enrollment email messages to work with Realex Support and obtain the same set of credentials for your production account.
NOTE: It’s important that you do not proceed here until the testing procedure described in Testing the Integration is successful.
Follow these steps to configure the production in Salesforce:
Void a transaction: If you’re using an actual credit card and want to prevent the charge from settling, remember to void the transaction after testing.
This table contains the mapping information between the gateway and Salesforce fields.
|Salesforce field||Direction||Gateway field|
|Gateway ID||<||First part of the Pass Ref field plus 2nd part of the Order ID at top of Realex detail page|
|Gateway ID||>||2nd part of the Order ID at top of Realex detail page|
|Gateway Date/Time||>||Date/Time in listing|