Integrating Realex (now Global Payments) with Salesforce using Chargent
Easily connect Global Payments (formerly Realex)and Salesforce with Chargent,the leading payments app on the Salesforce AppExchange. See all Realex transactions, manage refunds, send payment links and more, all inside Salesforce.
Contact us for a no-obligation 30 day trial, and see for yourself!
This guide contains instructions for integrating your Salesforce.com environment with the Realex payment gateway—recently rebranded Global Payments -- using the Chargent payment processing plug-in.
Click a link to go directly to one of these sections:
- Prior to setting up Realex in Salesforce
- Setting up Realex in Salesforce
- Add a Realex Gateway record in Salesforce using Chargent’s Gateway Wizard
- Add a Realex Gateway record in Salesforce (Chargent versions prior to 5.40)
- Realex Test Credit Cards
- Refunds and Rebates with Realex
- Sending Live Transactions from a Salesforce Sandbox
- Understanding Transactions
- Verifying Transactions in the Realex Dashboard
- Correspondence in the Transaction Fields
- Moving to Production
- Refunds vs Rebates in Realex
- Correspondence in the Transaction Fields
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.
Realex Payments was acquired by Global Payments Inc. in March 2014. In 2018, the Realex name was changed to Global Payments.
Using the step by step 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.
Prior to setting up Realex in Salesforce
- Install both the Base Package and the Chargent Orders Transaction Package of Chargent into your Salesforce org.
- Configure Chargent according to the Quick Start Guide.
For Chargent versions prior to 5.57 you may need to activate the Remote Site Settings in Salesforce if they aren’t already active for Realex.
- Click the gear icon on the top right and select Settings
- Under Security select Remote Site Settings
- Locate RealexPayment and click edit
- Check the Active box
- Click Save
Your Realex Sandbox 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
Username and temporary password
Upon approval, you’ll receive an email that contains these testing credentials:
- User ID
- Temporary password
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.
Keep in mind that Realex may need to whitelist Salesforce IP addresses for your account.
Setting up Realex / Global Payments in Salesforce
Add a Realex Gateway record in Salesforce using Chargent’s Gateway Wizard.
- Click on the App Launcher on the top left side in Salesforce.
- Select Chargent as the App
- Select the Chargent Settings Tab
- Choose Chargent Setup Wizard
- Do you have a Payment Gateway account - Select Yes
- Select Realex as your Payment gateway.
- Select Test Transactions for testing or Live Transactions if you are looking to process real time payments.
- Follow the prompts to configure your gateway.
You will need the following information:
- Add your credentials based on your Sandbox (Test) or Production Live Realex account.
- User Name: This is your Realex Merchant ID
- Shared Secret and Refund Password:: This will be your Secret Key and Refund Password joined together with an @ symbol (ex: if your Secret Key is ‘mycompany’ and your Refund Password is ‘12345abcd’, then this field would be mycompany@12345abcd).
Other information that will be asked:
- Will you be using tokenization? (recommended)
- What currency will you be using? (USD, CAD, etc..)
- What Credit Card types will you be accepting? (Visa, Mastercard, etc…)
- Payment Console Setup (Premium feature for Platform Edition)
- Show Charge Button
- Show / Create Update Token Button
- Show Authorize Button
Add a Realex Gateway record in Salesforce (Chargent versions prior to 5.40)
- Click on the AppLauncher on the top left side in Salesforce.
- In the Search for apps or items box, Search for Gateways and select
- Click New and select Realex as the Gateway Type
- Map the following fields in Chargent with your credentials from Realex:
- Merchant ID: Realex Merchant ID
- Merchant Security Key: This will be your Secret Key and Refund Password joined together with an @ symbol (ex: if your Secret Key is ‘mycompany’ and your Refund Password is ‘12345abcd’, then this field would be mycompany@12345abcd).
- Check the Active box - To make the Gateway active
- Use Tokenization - If you are planning on using Realex tokenization (recommended)
- Available Card Types - Select the cards you will be accepting (this is based on your gateway settings and what card types they can process - Visa, Mastercard, American Express, etc..)
- Available Payment Methods -Will you be accepting just Credit Cards or ACH (also known as electronic check, e-check, or direct debit)
- Available Currencies - What currencies will you accept (this is based on your payment gateway and the currencies they accept payment in.
- Credit Card / Bank Account Data Handling - This lets Chargent know when to clear the information in Salesforce. You have 4 options.
When using Payment Requests or Payment Console the following should also be set. Please note these features come with Sites and Platform edition & require activation in your Production Org.
- Available PR Transaction Types
- Charge Full Amount - Charges the credit card immediately
- Authorize Full Amount - This option won’t charge the card but only holds the funds available until you charge the card.
- Authorize Minimum Amount - This option won’t charge the card but only holds the minimum amount that your gateway will allow. You will need to charge the correct amount in order to capture the transaction
- Show Charge Button
- Show Authorize Button
Now that you have created the Realex gateway record in Salesforce, it is time to run some test transactions to ensure it was set up correctly, and understand how Chargent works to charge credit cards within Salesforce
Create a Chargent Order in Salesforce to run test transactions
- Click on the App Launcher in the top left side and select Chargent as the App.
- Click the Chargent Orders Tab.
- Click on New
- Enter in the following information:
- Account: The Account the Chargent Order should be associated with.
- Charge Type should be either credit card or Check depending on if you are testing credit cards or electronic check (ACH or direct debit)
- Billing Information
- Billing First Name
- Billing Last Name
- Billing Address
- Billing City
- Billing State / Province
- Billing Zip Code / Postal Code
- Billing Email Address (if you want to test the email receipt that gets triggered upon a successful transaction)
- Charge Amount (check the Manual Charge to enter a specific amount. If you are entering Subtotal, Tax, and Shipping then the Charge Amount will default to the Balance Due and the Manual Charge box does not need to be checked)..
- Credit Card Number = See Realex test credit card information. Realex uses different test credit card numbers to determine the response message and whether it’s approved or declined for specific reasons.
- Card type (Visa, MasterCard, etc..) or Bank Account Type for ACH (Checking or Savings).
- Card Expiration Month and Card Expiration Year should be in the future
You should receive a popup that shows the test transaction was approved.
Realex / Global Payments Test Credit Cards
|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|
Refunds and Rebates with Realex
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, 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.
Sending Live Transactions from a Salesforce Sandbox
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 under the Related section of the Chargent Order.
On the Chargent Order page, click the Related tab, and select 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.
Verifying Transactions in the Realex Dashboard
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.
Correspondence in the Transaction Fields
The Salesforce Gateway ID is the Realex Pas Ref combined with the Realex Order ID, with an underscore between them.
Moving to Production
This section contains the procedure for configuring the integration in a production system.
Get your Production Credentials
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:
- First, obtain the production credentials for the Realex production gateway account (similar to the method given for sandbox credentials in Obtain a Realex Sandbox Account.
- Get these production credentials from your enrollment email message(s):
- User ID
- Realex Shared Secret and Refund Password, merged by a "@" symbol. For example, “secret@refund". This will be the Merchant Security Key in Salesforce.
- Version 5.40 or current use the Chargent Setup Wizard
- Versions prior to 5.40, set up the gateway manually
Refunds vs Rebates in Realex
Realex has two refund modes. Refunds for transactions that are more than 60 days. This will allow you to refund a credit card that is not attached to the original transaction. Rebates will have the original transaction and the Auth ID. It would only be available for transactions up until 60 days. After 60 dates you would need to issue a Refund.
With both you have to append a refund/rebate password in the gateway record setup, to be entered in the Merchant Security key field with "@" character separator - example: secretkey@refundpassword
You will also need to check the box in your Chargent Settings (under Advanced Settings) to allow you to use Realex Rebate Method.
Correspondence in the Transaction Fields
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 ID||>||Date/Time in listing|