Integrating BluePay with Salesforce using Chargent
This guide contains instructions for integrating your Salesforce.com environment with the BluePay payment gateway—using the Chargent payment processing plug-in.
Click a link to go directly to one of these sections:
- Obtain a BluePay Sandbox Account
- Obtain the Secret key from your BluePay test account
- Configuring Salesforce for BluePay Integration
- Enabling a Remote Site in Salesforce
- Testing the BluePay Integration
- Understanding Transactions
- Correspondence in the Transaction Fields
- Going Live
BluePay is a leading provider of technology-enabled payment processing for merchants and suppliers of any size in the United States and Canada. Through online and mobile interfaces, as well as CRM and ERP software integrations, BluePay processes business-to-consumer and business-to-business payments while providing real-time settlement, reporting, and reconciliation—along with robust security features such as tokenization and point-to-point encryption.
Using the step-wise instructions in this guide, it’s easy to connect Salesforce to the BluePay gateway with Chargent Payment Processing using Authorize.net emulation. 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 BluePay 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 BluePay gateway directly to Salesforce. Optionally, Chargent enables gateway tokenization for processing credit card payments, and also offers support for ACH/eCheck payments. See Setting Up Salesforce For Integration for additional information on the gateways.
Obtain a BluePay Sandbox Account
The first task is to get a test account from BluePay so that you can run test transactions from Salesforce.
To request a sandbox account, complete the form on the Sandbox Account Request page.
Upon approval, you’ll receive an email that contains these testing credentials:
- Account ID
- User ID
- Password (temporary)
Production account: You’ll also need to register for a production account. Use the contact information in the enrollment email messages to work with BluePay Support and obtain the same set of credentials for your production account.NOTE: You must get each of these gateway credentials from BluePay before moving on to the steps in the next section, Configuring Salesforce For Integration.
Obtain the Secret key from your BluePay test account
As we explain in the next section, it’s necessary to enter the Security Key into Salesforce. Follow these steps below to locate your Secret Key for your BluePay account:
Login to the BluePay Account page.
- In the menu, click Admin > Accounts.
In the Account List panel, click the Account Name link.
Scroll down to find the 32-character Secret Key. It is this key that you need to copy and paste into the Merchant Security Key field on the Gateway page in Salesforce (as given in the instructions in the next section).
Configuring Salesforce for BluePay Integration
NOTE: You must get each of these gateway credentials from BluePay before moving on to the steps in the next section, Configuring Salesforce For Integration.
Follow the steps below to configure Salesforce to integrate with BluePay:
- Install the Chargent Base Package into Salesforce, as we describe on the Chargent Installation page.
NOTE: Both the sandbox and production installation of Chargent include a free, 30-day trial license.
- Install the Chargent Orders Transaction Package in Salesforce, as we describe on the Chargent Installation page.
Complete the basic Chargent setup, such as assigning user licenses and updating page layouts. For more information, please consult our Quick Start Guide.
As shown in the figure at right, select the Chargent item in upper-right corner of Salesforce.
In the upper-left of the Salesforce page, click the Gateways tab, then click the Create New drop-down, and then select Gateway.
Chargent uses Authorize.net emulation to for integrating BluePay with Salesforce. In the Gateway Record Type panel, select the Authorize.net item from the Record Type drop-down, and then click the Continue button.
On the Gateway Edit page, enter the Gateway Name (such as “BluePay Test”), which is an internal Salesforce name that you choose for the gateway.
Use the table below for guidance when entering the test credentials that can be found in the email from BluePay Support:
Gateway Page Field Value Gateway Name Enter an easily recognizable name for this gateway, such as “BluePay Test”. Merchant ID Your 12-digit BluePay ACCOUNT ID Merchant Security Key 32-character BluePay Secret Key (see the previous section, Obtain the Secret key from your BluePay test account) Endpoint Override https://secure.bluepay.com/interfaces/a.net.test Active Check this box
- In Salesforce, it’s necessary to add the remote site entry for BluePay as we explain in the next section (Enabling a Remote Site in Salesforce).
Your Gateway page should look similar to the figure below. Click the Save button to commit your changes.
Enabling a Remote Site in Salesforce
Follow these steps to connect your Salesforce environment to the BluePay endpoint:
- In the left-side menu in Salesforce, navigate to Setup > Administer / Security Controls > Remote Site Settings.
Click the New Remote Site button (see the figure below).
- For the new remote site, enter “BluePay” for the Remote Site Name.
- Enter “https://secure.bluepay.com” for the Remote Site URL.
- Click Save.
Testing the BluePay Integration
This section contains the procedure for testing the integration that you set up according to the procedure given in Setting Up Salesforce For Integration, using your BluePay sandbox credentials.
Follow the steps below to verify that the integration is correct.
- In the upper-left corner of the Salesforce page, click the + tab to open the All Tabs page.
In the tabs listing, locate the link that corresponds to the Chargent Transaction Package that you installed during the Configuring Salesforce For Integration procedure.
See the figure to the right, 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).
- On the next page, click the New button (see the figure below).
As shown on the BluePay Testing page, these are valid test credit card numbers.
Card Type Card Number Visa 4111111111111111 Visa 4242424242424242 MasterCard 5439750001500222 MasterCard 5439750001500347 Discover 6011111111111117 American Express 378282246310005
- Use a test CVC value of 123.
- For BluePay, submission of an odd dollar amount such as $1.00, $9.00, or $25.00 will cause a APPROVED message to return. Even dollar amounts such as $2.00, $16.00, or $32.15 will cause the return of a DECLINE message.
- Expiration dates in the future are returned as valid; expiration dates in the past are returned as invalid.
In the Chargent Order Edit page, enter or select information to correctly complete the essential parts of the form, including:
- Billing First Name
- Billing Last Name
- Billing Address (City, State, Zipcode)
- Billing Email Address (to get a receipt)
- Charge Amount (check Manual Charge if this amount is not calculated from Subtotal + Tax + Shipping)
- Payment Method
- Card Type
- Card Number
- Card Expiration Month
- Card Expiration Year (use a future year)
- Card Last 4
See the figure below for the placement of these fields.
Click the Save button to commit the changes on the form. On the next page, click the Charge button (as shown below).
When the transaction is complete, you see a small pop-up as shown in this figure. Click the OK button to close the pop-up window, then scroll to the bottom of the Order page.
A record is created for each error and each successful transaction, and this record contains the response messages and details that are sent back from BluePay. See the figure below for an example.
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 BluePay:
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 BluePay 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 BluePay 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 BluePay administrative app. As shown in the figure below, click the Processing menu category, then click Transactions > Transaction List. Then click the link for a specific transaction to view details.
Correspondence in the Transaction Fields
The Gateway Date is the timestamp for the submission to BluePay, and the Gateway ID field corresponds to the BluePay Transaction ID for use in reconciliation between two systems.
This table contains the mapping information between BluePay and Salesforce fields.
|Salesforce field||Direction||Gateway field|
|Gateway ID||<||Transaction ID|
|Invoice Number||>||Invoice ID|
|PO Number||>||Order ID|
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.
- First, obtain the production credentials for the BluePay production gateway account (similar to the method given for sandbox credentials in Obtain a BluePay Sandbox Account.
Get these production credentials from your enrollment email message:
- Account ID
- User ID
- Password (temporary)
- Repeat the steps in the Configuring Salesforce for BluePay Integration section above, but substitute the production credentials.
- For the production Endpoint Override field, enter:
- Repeat the steps in the Testing the BluePay Integration section above with respect to the SalesForce production environment, using the production credentials.
Void the transactions: 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.