Integrating BluePay with Salesforce using Chargent
Easily connect BluePay and Salesforce with Chargent,the leading payments app on the Salesforce AppExchange. See all BluePay 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 BluePay payment gateway using the Chargent payment processing plug-in.
Please note the following:
- Following BluePay instructions will also work for any payment gateways that support Authorize.net AIM emulation. You will simply need to use different endpoints. Limits of Authorize.net Emulation
- Most gateways that support Authorize.net AIM emulation work with Chargent, but soe functionality may be limited. Chargent’s integration with BluePay uses Authorize.net emulation (versus being a native integration). This means that most standard transaction types work (Authorize, Charge, Refund, Void) and ACH transactions work, but advanced features like Tokenization and some fraud screening features are not supported.
- Obtain a BluePay Sandbox Account
- Prior to setting up BlueSnap in Salesforce
- Setting Up Salesforce to Connect to BluePay
- Add a BluePay Gateway record in Salesforce using Chargent’s Gateway Wizard
- Add a BluePay Gateway record in Salesforce (Chargent versions prior to 5.40)
- Testing the Integration
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.
Using the 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.
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 at least your test credentials from BluePay before moving on to the steps in the next section.
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).
Prior to setting up BlueSnap in Salesforce
Prior to following the steps in this guide, Chargent should be installed in your Salesforce org and licenses assigned. If you have not yet installed, a 30 day free trial is available on our Installation Page.
Since Chargent’s BluePay integration is connected via Authorize.net Emulation, you will need to first add the Remote Site.
- Click the Gear icon on the top right side of Salesforce and select Setup
- Under Security click Remote Site Settings
- Click the button for New Remote Site.
- For the new remote site, enter “BluePay” for the Remote Site Name.
- Enter “https://secure.bluepay.com” for the Remote Site URL.
- Click Save.
Setting Up Salesforce to Connect to BluePay
Add a BluePay 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 Authorize.net as your Payment gateway (BluePay uses emulation of Authorize.net)
- Select Test Transactions for testing or Live Transactions if you are looking to process real payments.
- Follow the prompts to configure your gateway.
- Name your Gateway (BluePay Test or BluePay Live)
You will need the following information:
- API Login ID:This is your BluePay Account ID
- Transaction Key:This is the BluePay Secret Key
- Endpoint Override:https://secure.bluepay.com/interfaces/a.net.test
Other information that will be asked:
- Will you be using tokenization? Select No since Tokenization is not available through the Authorize.net Emulator.
- What currency will you be using? (USD, CAN, etc.)
- What payment methods will you be accepting?
- Credit cards and/or Direct Debit / 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 (this should be turned off since BluePay does not support tokenization)
- Show Authorize Button
Add a BluePay 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 Authorize.net as the Gateway Type (BluePay uses emulation of Authorize.net)
- Name the Gateway BluePay Test (or BluePay Live if you’re processing live credit cards)
- Map the following fields in Chargent with your credentials from BlueSnap:
- Merchant ID:BluePay Account ID
- Merchant Security Key: Your BluePay Secret Key
- Endpoint Override: https://secure.bluepay.com/interfaces/a.net.test
- Active - Check to make the Gateway active
- Use Tokenization - Leave this unchecked since Tokenization is not available through the Authorize.net emulator.
- 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 Direct Debit / ACH
- 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 capture them.
- 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
Your Gateway page should look similar to the figure below once you have saved.
Testing the Integration
Now that you have created the BluePay 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 take payments 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.
- Payment Type should either be credit card or check depending on if you are testing credit cards
- 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- The amount you want to test with in order to process a test transaction. This can be any amount
- Manual Charge check this box to enter a number directly in the Charge Amount. If you are entering Subtotal, Tax, and/or Shipping then the Charge Amount will be automatically calculated and the Manual Charge box does not need to be checked.
- Credit Card Number = See BluePay test credit card information. BlueSnap uses different test credit card numbers to determine the response message and whether it’s approved or declined for specific reasons. For ACH testing see BluePay’s Test ACH Account and Routing Numbers.
- Card type (Visa, MasterCard, etc..)
- Card Expiration Month and Card Expiration Year should be in the future
You should receive a popup that shows the test transaction was approved.
BluePay Test Credit Cards
|Card Type||Card Number|
BluePay Test ACH / Electronic Check
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. You can access the list of Transaction records by clicking on the Related tab.
That’s it! You’ve now setup your BluePay gateway and tested it.
For going live and other considerations, please see the following additional information:
- Going Live
- Understanding Transactions
- Correspondence in the Transaction Fields
This section contains the procedure for configuring the integration in a production system.
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)
Sending Live Transactions from a Salesforce Sandbox
Once you have your live BluePay credentials, you can test a live transaction from your 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).
Going Live in Production
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 using live credit card data.
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.
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 under the Related tab of the Chargent Order.
Click a Transaction IDlink 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|