Integrating Realex and Salesforce using Chargent
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
- Testing using Chargent Anywhere
- Testing with Payment Console
- Testing using Payment Request
- Realex / Global Payments 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
Connect Realex and Salesforce with Chargent
See all Realex 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!
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 [email protected]).
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
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 Realex test credit cards below.
- 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 Realex credit cards testing numbers to complete the payform and submit the payment.
You should receive a green box confirmation
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 typically 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, checking the Test Endpoint checkbox on the Gateway record will route transactions to the test environments provided by the gateway.
Note: Some gateways use the same endpoint for live and test environments. For these gateways, the Chargent application does not prevent live transaction processing. As such, it is best practice to deactivate your live gateway records in orgs used for testing.
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, “[email protected]) 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, “[email protected]”. This will be the Merchant Security Key in Salesforce.
- Repeat the steps in above, but substitute the production credentials
- Version 5.40 or current use the Chargent Setup Wizard
- Versions prior to 5.40, set up the gateway manually
- Repeat the steps in the Testing the Realex Integration section above with respect to the SalesForce production environment, using the production credentials
- 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.
- 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.
Refunds vs Rebates in Realex
Realex uses Refunds for transactions that are more than 60 days old. 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 and would only be available for transactions up till 60 days. After 60 days you would need to issue a Refund.
Note: Rebates are available in 4.92 or later. If you receive an error stating missing required field “Auth ID” you want to update your Chargent Package
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|