Integrating Merchant e-Solutions and Salesforce using Chargent

MerchantE
Connect Merchant e-Solutions and Salesforce with Chargent

See all Merchant e-Solutions 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!

Learn More

Overview

MerchantE (Formerly Merchant e-Solutions) is a merchant acquirer and global processor that processes over $17 billion in transactions annually in 150 different global currencies. MerchantE is owned by Cielo S.A., Latin America’s leader in electronic payment solutions.

Using MerchantE 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 MerchantE payment gateway directly to Salesforce. Chargent uses the tokenization of the gateway for processing credit card payments, but does not currently support ACH/eCheck payment.

Configuring MerchantE for Integration

In this section and the next, you’ll find the procedures for configuring the integrations for both Merchant e-Solutions and Salesforce.

Begin by contacting MerchantE to obtain a merchant account and get credentials—for both a sandbox account and a production account.

Sandbox:https://mes.force.com/mespcomm/c/DevPortalRegistrationApp.app

MerchantE Certification

Complete the form and click the Register button at the bottom of the page. Once you’re approved you will receive a Profile ID that will allow you to send test transactions to a test environment.

Productionhttps://developer.merchante.com/

Under Step 1 Sign Up click on the Sign Up button below the Production option.

  1. Scroll down to the Become a Merchant section and click Learn More
  2. Fill in all the information completely and press Submit.

You should get the following two credentials for each account in an email from MerchantE. (The email could take 24 hours to receive).

  • Profile ID
  • Profile Key

Setting Up Salesforce to Connect with MerchantE (Merchant e-Solutions)

Prior to setting up Merchant e-Solutions in Salesforce

Once you have your Profile ID and Profile Key from Merchant e-Solutions you can install and configure Chargent.

  1. Install Chargent Packages into your Salesforce org.
  2. Configure Chargent according to the Quick Start Guide.

Add a Merchant e-Solutions Gateway record in Salesforce using Chargent’s Gateway Wizard.

  1. Click on the App Launcher on the top left side in Salesforce.
    applauncher
  2. Select Chargent as the App
  3. Select the Chargent Settings Tab
  4. Choose Chargent Setup Wizard
    chargent settings
  5. Do you have a Payment Gateway account – Select Yes
  6. Select Merchant e-Solutions as your Payment gateway.
  7. Select Test Transactions for testing or Live Transactions if you are looking to process real payments.
  8. Follow the prompts to configure your gateway.

Add your credentials based on your Sandbox (Test) or Production Live MerchantE account.

    • Profile ID: This is your Profile ID from the email your received from MerchantE
    • Profile Key: This is the Profile Key from the email you received from MerchantE

Other information that will be asked:

  • Will you be using tokenization? (recommended)
  • What currency will you be using? (AUD, USD, etc.)
  • What payment methods will you be accepting?
    • Credit cards and/or ACH (Chargent and MerchantE currently do not support ACH / Electronic Check)
    • 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 the Integration 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.

  1. Click the [PaymentConsole] button
  2. If you are using multiple gateways select your gateway from the dropdown otherwise continue to step 3
  3. Enter all the Billing Information and click [Next]
  4. Enter in a test credit card number, expiration date, and CVC code based on the MerchantE test credit cards below.
  5. Click the [Charge] button.

You should receive a green box showing Approved.

MerchantE

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.

  1. Click the [Send Payment Request] button
  2. If you have multiple Payment Request templates set up you will first choose what template you want to use.
  3. Enter an email address where you want to send the test Payment Request along with any amount.
  4. Enter a Contact name (Optional)
  5. Click the [Send Request] button

Send Payment Request

When you receive the email, click the secure link for the Payment Request. Use one of MerchantE credit card numbers to complete the payform and submit the payment.

Card Bank Payment

You should receive a green box confirmation

Card Bank payment

MerchantE Test Credit Cards

Card Type Length Card Number
Visa 16 4012301230123010
MasterCard 16 5123012301230120
American Express 15 349999999999991
Discover 16 6011011231231235
JOB 16 3528288605211810

Address Verification Testing – The values table below can be used if you would like to test all possible Merchant e-Solutions AVS responses. The combination of the Street Address and Zip Code in the request will generate the associated AVS Result Code in the response.

Street Address ZIP Code AVS Result Code
123 55555 Y – street and postal code match
123 999991111 Y – street and postal code match (Visa) X – street and postal code match (MasterCard)
123 EH8 9ST D – exact match, international
123 Other Zip A – address match, zip mismatch
234 Any ZIP U – address unavailable
345 Any ZIP G – verification unavailable due to international issuer non-participation (Visa and MasterCard only)
456 Any ZIP R – issuer system unavailable, retry
235 Any ZIP S – AVS not supported
Other Address 55555 Z – address mismatch, 5-digit zip match
Other Address EH8 9ST Z – address mismatch, international zip match
Other Address 999991111 Z – address mismatch, zip match (Visa) W – address mismatch, zip match (MasterCard)
Other Address Other ZIP N – address and zip mismatch

CVV Codes – The table below lists the Merchant e-Solutions responses codes for testing CVV, CVC, and CID-which is the 3- or 4-digit code printed on the back of a card. This security feature assists merchants in processing a Card-Not-Present transaction, and receiving a positive response improves the likelihood that the cardholder making the purchase is in physical possession of the card. Visa, MC, and Discover encode a 3-digit value on their cards, which American Express encodes either a 3- or 4-digit value. Sending one of the following CVV/CVC values will return the corresponding result code:

CVV / CVC Value Result Code
123 M – Match
234 P – Not Processed
345 U – Issuer is not certified
else N – No Match

Amount Driven Response – In addition to testing for approval codes, this table will allow testing for a variety of potential response codes:

Auth response text Reason/Description
“Card OK” For card verification testing, submit a transaction code=A
“Call” Refer to issuer
“Call” Refer to issuer – special condition
“Hold-call” Pick up card (no fraud)
“Decline” Do not honor
“Hold-call” Pick up card (fraud)
“Card No. Error” Invalid card number
“No Such Issuer” Invalid card number
“RE Enter” Re-enter transaction
“Hold-call” Pick up card (fraud: lost card)
“Hold-call” Pick up card (fraud: stolen card)
“Decline” Insufficient funds
“Expired Card” Issuer indicates card is expired
“Serv Not Allowed” Transaction not permitted to cardholder
“Suspected Fraud” Do not honor card
“Invalid Auth” Invalid Authorization Life Cycle
“Can’t Verify P” System is unable to validate the Pin #
“CT NOT ALLOWED” Merchant does not accept this type of card

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 Merchant e-Solutions:

https://api.merchante-solutions.com/mes-api/tridentApi

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).

Understanding Transactions

When a transaction occurs between Chargent and the Merchant e-Solutions gateway, a new transaction record is created, which can be found under the Related section of the Chargent Order page.

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 Merchant e-Solutions sends in its response, including transaction Type (Charge, Authorize, Refund or Void), the Response Status (Approved, Declined, Error).

The Gateway Date is the timestamp for the submission to Merchant e-Solutions, and the Gateway ID field corresponds to the Merchant e-Solutions Transaction ID for use in reconciliation between two systems.

NOTE: MerchantE does not provide an online reporting interface for test / sandbox accounts. Online reporting is only available for production accounts.

See the figure below.

trx
electronic

The figure below depicts how the same transaction appears in the Merchant e-Solutions Transactions page:

payment gateway

Field Mapping

This table contains the mapping information between some key MerchantE and Salesforce fields.

Salesforce field Direction Merchant e-Solutions field
Gateway ID < Transaction ID
Invoice Number > Invoice Number

Going Live

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.

  1. First, obtain the production credentials for the Merchant e-Solutions production gateway account (the productions credentials from Configuring Merchant e-Solutions for Integration).
    • Profile ID
    • Profile Key
  2. Repeat the steps in the Configuring SalesForce for Integration section above, but substitute the production credentials.
  3. Repeat the steps in the Testing the Integration section above with respect to the Salesforce production environment, using the production credentials.

NOTE: Remember to void the transaction after testing, if you are using a real credit card and want to prevent the charge from settling.

Be sure to successfully transmit at least one real credit card transaction and one real ACH transaction-using company or personal accounts. We recommend that you submit a transaction with a very small amount and then voiding that transaction afterwards.

Tokenization

Chargent supports tokenization for MerchantE. Tokens are a random string of letters and numbers that can be stored in Salesforce and used in place of the credit card for future transactions. Tokenization reduces the scope of PCI compliance by allowing credit card information to be cleared from Salesforce after processing a transaction.

If you haven’t already setup tokenization in Salesforce during the initial configuration of your MerchantE account in Salesforce, this section will assist you in setting it up. Merchant e-Solutions uses a token system in order to maximize security of credit card data.

  1. In the top left corner click on the App Launcher
  2. Search and select Gateways
  3. Click on Merchant e-Solutions
  4. Click Edit
  5. Check the box that Says Tokenization
  6. Under the Credit Card / Bank Account handling field choose one of the following.
    • Never Clear
    • Clear After Successful Charge
    • Clear After All Transactions
    • Clear When Token is Present (recommended)
  7. Click Save.

solutions test

NOTE: After your first successful transaction, the token is stored in the Chargent Token field in Salesforce and the credit card fields are handled according to the choice in the Credit Card Data Handling field.

Unmatched Credits for Credit Cards

Chargent’s integration with Merchant e-Solutions has the ability to issue Unmatched Credits to a credit card. An Unmatched Credit is when you are refunding a transaction to a different credit card than the original one used in the initial transaction. This can also be used to send money to a credit card, without a matching transaction normally required for refunds.

To create an unmatched refund you will need to do the following:

  1. Create a new Chargent Order
  2. Make sure the Charge Amount is a negative amount
  3. Select Payment Method Credit Card
  4. Enter in the credit card details including Billing First Name and Billing Last Name. (for testing in the Sandbox you can use Visa with a credit card number 4111 1111 1111 1111)
  5. Save
  6. Press the Charge button
  7. Enter the CVV code and press Charge

This sends a negative amount to MerchantE which will issue a credit to the credit card you designate.

When testing initially, you should ensure that the credit is showing up correctly in your MerchantE account.

Note: If there is an existing token present you want to remove the token in order to process the refund to a different credit card. Chargent recommends creating a new Chargent Order and associate it with the Account record. This will allow you to keep the original Chargent Order and token in tact for future charges on the existing Chargent Order.