Integrating Ezidebit with Salesforce using Chargent
This guide contains instructions for integrating your Salesforce.com environment with the Ezidebit payment gateway—using the Chargent payment processing plug-in.
Click a link to go directly to one of these sections:
- Your Ezidebit Sandbox Account
- Configuring Salesforce for Ezidebit Integration
- Testing the Integration
- Testing Direct Debit Transactions
- Understanding Transactions
- Correspondence in the Transaction Fields
- Moving to Production
- Transaction Synchronization
Ezidebit is an Australia based payment provider that offers a range of online payment solutions to merchants worldwide. Based in Australia and now part of the Global Payments network, Ezidebit has been empowering businesses, large and small since 1998. Over the years, we’ve helped thousands of businesses across Australia, New Zealand, and Hong Kong to regain control of their cash flow through the use of secure online payment solutions, including Direct Debit, BPAY and E-Commerce. Ezidebit specialise in bringing revenue more efficiently to businesses across a diverse range of sectors, including childcare, fitness, education, accountancy and charities, to name just a few.
Using the stepwise instructions in this guide, it’s easy to connect Salesforce to the Ezidebit gateway with Chargent Payment Processing. 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 Ezidebit 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 Ezidebit gateway directly to Salesforce. Chargent also supports Ezidebit gateway tokenization for processing credit card and direct debit payments. See Configuring Salesforce for Ezidebit Integration for additional information on the gateways.
Your Ezidebit Sandbox Account
The first task is to get a sandbox / test account from Ezidebit so that you can run test transactions from Salesforce. To being the process for obtaining a sandbox account, complete the form on the Enquiry 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 administration login page:
Login with your username and temporary password, and then follow the prompts to change your password.
Need help? Contact Ezidebit 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. The password must be:
- Alphanumeric (contain at least a number and a letter).
- Different than your last four passwords.
- At least 6 characters long.
Get your Digital Key
In the same email that contains your credentials you also find a Digital Key.
You will need each of these to configure the gateway connection in Salesforce:
- Digital Key → Merchant ID
- Digital Key → Merchant Security Key
See the next section, Configuring Salesforce for Ezidebit Integration.
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 Ezidebit Support and obtain the same set of credentials for your production account.
NOTE: You must get each of these gateway credentials from Ezidebit before moving on to the steps in the next section, Configuring Salesforce for Ezidebit Integration.
Configuring Salesforce for Ezidebit Integration
- The steps in this section are written with the assumption that Chargent has not already been installed into your Salesforce account.
- Before moving on to the procedure below, you must successfully complete all of the steps given in the previous section, Obtain a Ezidebit Sandbox Account.
Follow the steps below to configure Salesforce to integrate with Ezidebit:
Install the Chargent Base Package into Salesforce, as we describe on the Chargent Installation
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.
In the Gateway Record Type panel, select the Ezidebit item from the Record Type drop-down, and then click the Continue
- On the Gateway Edit page, begin by entering a Gateway Name (such as “Ezidebit Test”). This is merely an internal Salesforce name that you choose for the gateway.
Use the table below for guidance when entering the remaining necessary values for the Gateway Edit page:
Gateway Page Field Value Gateway Name Enter an easily recognizable name for this gateway, such as “Ezidebit Test”. Merchant ID Digital Key Merchant Security Key Digital Key Active Check this box
NOTE: The Ezidebit Digital Key is taken from your Ezidebit introductory email message. See the section above, Get your Digital Key.
Your Gateway page should look similar to the figure below. Click the Save button to commit your changes.
Testing the Integration
This section contains the procedure for testing the integration that you set up according to the procedure given in Configuring Salesforce for Ezidebit Integration, using your Ezidebit sandbox credentials.
- There is no support for authorization or void transactions.
- Refund is supported for credit cards only.
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 Ezidebit Integration
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 Ezidebit Realtime Test Credit Card page, these are valid test credit card numbers.
Card Type Card Number Expiry Date CVN MasterCard 5123 4567 8901 2346 Current month/year Any Visa 4987 6543 2109 8769 Current month/year Any Amex 3400 0000 0000 009 Current month/year Any Amex 3411 1111 1111 111 Current month/year Any Amex 3421 3589 8797 783 Current month/year Any Amex 3423 3764 9030 528 Current month/year Any Diners Club 3012 3456 7890 19 Current month/year Any
- See the Ezidebit Credit Card Response page to see which codes will generate various approved and declined transactions for each credit card type. You can trigger an error by varying the numbers in the cents value in the Charge Amount For example, a charge amount of $2.34 will cause an Error 34 response code.
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 Ezidebit. 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 EziDebit:
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).
Testing Direct Debit Transactions
For Direct Debit, it’s important the Australian Bank Account BSB number should be entered in the Bank Routing Number field in Salesforce.
The BSB (Bank-State-Branch) Number is a six-digit numerical code that identifies an individual branch of an Australian financial institution. The BSB Number is a primary idenifier in both the Australian Paper Clearing System (APCS) and Bulk Electronic Clearing System (BECS) payment systems. To perform a money transfer, the BSB Number is necessary—along with the bank account number of the recipient.
When a transaction occurs between Chargent and the Ezidebit 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 Ezidebit 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 Ezidebit Dashboard
You can compare the transaction records in Salesforce with the records in your Ezidebit dashboard. Login to Ezidebit, locate the Processed Payments section on the Dashboard, and then click the Search button. See the figure below.
Locate the transaction of interest in the listing, and click anywhere on the transaction row to see all details for that transaction.
Use the Payment Date and timestamp to compare with your transaction timestamp in Sales force.
Moving to Production
This section contains the procedure for configuring the integration in a production system.
NOTE: It’s important that you do not proceed here until the testing procedure described in Testing the Integration is successful.
- First, obtain the production credentials for the Ezidebit production gateway account (similar to the method given for sandbox credentials in Obtain a Ezidebit Sandbox Account.
Get these production credentials from your enrollment email message:
- User ID
- Digital Key
- Repeat the steps in the Configuring Salesforce for Ezidebit Integration section above, but substitute the production
- Repeat the steps in the Testing the Ezidebit 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.
Chargent supports Ezidebit 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 Ezidebit. Tokens are used to improve security by replacing account numbers in Salesforce, and referencing the data securely stored at Ezidebit.
From the drop-down in the upper-right of the Salesforce page, choose Chargent as the app.
Click Gateway tab in Chargent app.
Click on the Gateway Name that you are using for the integration.
Double-click on Credit Card Data Handling A drop-down will open, as shown in the figure below.
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 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:
- Never Clear - Chargent will not automatically remove card data.
- Clear After Successful Charge - Chargent will clear the credit card number, expiration dates, and card security code only after a successful charge occurs for a card.
- Clear After All Transactions - Chargent will erase the credit card number, expiration date, and card security code after any transaction (Charge, Void, Refund) occurs for a card.
- Never Clear - Chargent will not automatically remove card data.
Click Save to commit your changes.
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 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 Ezidebit. 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 followup task. Previously, it was necessary to do a daily check of Ezidebit reports or wait for a letter in the mail to learn about about the status of such transactions.
- fatal dishonour