This guide contains instructions for integrating your Salesforce.com environment with the BlueSnap payment gateway—using the Chargent payment processing plug-in.
Click a link to go directly to one of these sections:
BlueSnap is a global payments company that believes every customer has the right to a seamless online experience and the ability to purchase easily, quickly, and securely. According to BlueSnap, since merchants spend countless hours bringing their products to market, they deserve the technology, tools, and support to create an exceptional buying experience.
Using the stepwise instructions in this guide, it’s easy to connect Salesforce to the BlueSnap 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 BlueSnap 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 BlueSnap gateway directly to Salesforce. Chargent also supports BlueSnap gateway tokenization for processing credit card payments. See Configuring Salesforce for BlueSnap Integration for additional information on the gateway.
The first task is to get a sandbox / test account from BlueSnap 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.
Upon approval, you’ll receive an email that contains these testing credentials:
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 BlueSnap through the options given on the 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.
NOTE : You must get each of these gateway credentials from BlueSnap before moving on to the steps in the next section, Configuring Salesforce for BlueSnap Integration.
You’ll need to whitelist an IP address prior to generating your BlueSnap credentials. BlueSnap has whitelisted all Salesforce IP addresses for the Chargent integration, however this step is required to generate your API credentials . IP check will be disabled once API credentials have been generated.
Click the Settings menu in the upper-right, then click the API Settings item to access the page, then scroll to the Authorized IPs section. Enter the new IP address that you need to whitelist, and then click the Add button.
We recommend whitelisting the Salesforce IP address 220.127.116.11, but any IP address in Salesforce’s range should work.
After logging in with your permanent password, access the API settings page to see your API Username, API Password , and Default Store ID . The API Username and Password must be specified when configuring the Gateway setup in Salesforce (see the next section).
Click the Settings menu in the upper-right and then click the API Settings item to access this page.
Follow the steps below to configure Salesforce to integrate with BlueSnap:
|Gateway Page Field||Value|
|Gateway Name||Enter an easily recognizable name for this gateway, such as “BlueSnap Test”.|
|Merchant ID||BlueSnap API User ID|
|Merchant Security Key||BlueSnap API Password|
|Active||Check this box|
NOTE: The values for the API User ID (Merchant ID) and API Password (Merchant Security Key) are taken from your BlueSnap account API Settings page. See the section above, API Username and temporary password
This section contains the procedure for testing the integration that you set up according to the procedure given in Configuring Salesforce for BlueSnap Integration, using your BlueSnap sandbox credentials.
Follow the steps below to verify that the integration is correct.
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 BlueSnap:
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 BlueSnap 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 BlueSnap sends in its response, including the 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 BlueSnap dashboard. Login to the BlueSnap test dashboard and click the Reports menu item on the left side, and then click the Transaction Detail link in the first section (as shown in the figure below).
You’ll see a transaction listing similar to this one.
In the listing, locate the transaction of interest and click on one of the links in the transaction row, then click again on the item of interest on the next page to see the details for that transaction.
This table contains the mapping information between the gateway and Salesforce fields.
|Salesforce field||Direction||Gateway field|
|Gateway ID||<||Order reference at the top of BlueSnap detail page|
|Gateway Date||>||Date/Time at the top of BlueSnap detail page|
|Invoice Number||>||Merchant Transaction ID|
This section contains the procedure for configuring the integration in a production system.
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 BlueSnap 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 is successful—as described in the section, Testing the Integration.
Follow these steps to configure the production integration in Salesforce:
Void auth transactions only: If you’re using an actual credit card and want to prevent the charge from settling, remember to void the transaction after testing. This is only possible for auth transactions.
Chargent supports BlueSnap tokenization for both credit card and direct debit transactions. This section contains the procedure for configuring the use of tokens that pass between Chargent and BlueSnap. Tokens are used to improve security by replacing account numbers in Salesforce, and referencing the data securely stored at BlueSnap.
We recommend that you choose the Clear When Token Present option, which would cause the Chargent system to erase the credit card number, expiration date, and card security code after any approved transaction (Charge, Void, Refund) for a card only if there is a value in the token field.
Otherwise, you can choose from among these other options:
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.
Chargent has always sent charges and authorizations to the payment gateways, and recorded the result in a real-time Transaction in Salesforce. Chargent can also update Salesforce records long after the initial transaction—for ACH / Direct Debit transactions that are returned for non-sufficient funds (NSF), credit card authorizations that expire, and more.
Two fields, Transaction Status and Settlement Date can now be updated through a daily scheduled batch in Salesforce.
Possible values of the Transaction Status are either final or non-final. It the status is final, then no more updates will occur for that transaction. Also, batches will not pick up any transaction having a final status.
The Settlement Date field stores the date and time when the Transaction Status is changed to final (such as "Settled" or "Voided"), after which it will no longer receives any updates.
To schedule the batch, navigate to Setup > Develop > Apex classes, and then click the Schedule Apex button. These are the batch names:
As shown in the documentation, the following are the various transaction status values for BlueSnap. Use either of the last two values to learn when a transaction has been dishonoured, and take appropriate action within Salesforce—such as sending an email or assigning a follow-up task. Previously, it was necessary to do a daily check of BlueSnap reports or wait for a letter in the mail to learn about about the status of such transactions.