AppFrontier

eWAY Salesforce Integration Chargent

Integrating eWAY and Salesforce using Chargent


Easily connect eWAY and Salesforce with Chargent,

the leading payments app on the Salesforce AppExchange. See all eWAY transactions, manage refunds, send payment links and more, all inside Salesforce.

Not yet a Chargent customer?
Contact us for a no-obligation 30 day trial, and see for yourself!



Overview

eWAY processes payments globally for companies in 8 different countries, with a particular focus on Australia, New Zealand, and the United Kingdom. Founded in 1998, their innovative platform, ecommerce technology, and personalized support has led them to handle 25% of online payments in Australia.

With Chargent Payment Processing for Salesforce's eWAY connection, you can now process payments through your eWAY account directly from Salesforce, no integration or complicated setup required. If you are an eWAY and Salesforce customer, follow the steps below and get started with a free trial today.

eway logo


Prior to setting up eWAY in Salesforce

  1. Install both the Base Package and the Chargent Orders Transaction Package into your Salesforce org.

  2. Configure Chargent according to the Quick Start Guide.

    For Chargent versions prior to 5.57 you may need to activate the Remote Site Settings in Salesforce if they aren’t already active for eWAY.

    • Click the gear icon on the top right and select Settings
    • Under Security select Remote Site Settings
    • Locate eWAYTest and click edit
    • Check the Active box
    • Click Save
    • Do the same for eWAYLive


Obtain your eWAY Sandbox API key and Password

  1. Log into your Sandbox account for Australia, New Zealand, or the United Kingdom

  2. Click on My Account and then go to User Security > Manage Roles

    • Enter a Role Name (such as "API Key") and
    • Click Create New Role
    • Click Continue

  3. Go Back to My Account > User Security > Manage Users

    • Click Create New User
    • Under Security Role select API Key
    • Complete all required fields including the password and click Create User
    • Click Continue
    • Select API Key on the left side of the new user

  4. Click View API Key to see and copy the API key to use in Chargent (Be sure to use the Rapid API Key and NOT the Pay Now key).

  5. eWay Sandbox

    eWay Sandbox

Configure eWAY Sandbox Settings

  1. Go to Settings > Sandbox and make sure PCI and Refunds checkboxes are checked in the Direct Payment Method section of the menu.

  2. Choose your Transaction Responses setting

    • Always Approve: Transactions will always approve. Note that invalid card numbers, expired cards, negative amounts will still trigger a decline.

    • Always Decline: Transactions will always be declined.

    • Use Cents Value: Depending on the cents value passed through the gateway the result will either return as transaction successful or failed. Example: $10.00 will return a response code 00 - Transaction Approved. View the full list of Response Codes to see which ones will pass a successful transaction on the test gateway

    eWay Direct Payment


Setting up eWAY in Salesforce

Add an eWAY Gateway record in Salesforce using Chargent’s Gateway Wizard.

  1. Click on the App Launcher on the top left side in Salesforce.

  2. eWay App Launcher

  3. Select Chargent as the App

  4. Select the Chargent Settings Tab

  5. Choose Chargent Setup Wizard

  6. eWay chargent setting

  7. Do you have a Payment Gateway account - Select Yes

  8. Select eWAY as your Payment gateway.

  9. Select Test Transactions for testing or Live Transactions if you are looking to process real payments.

  10. Follow the prompts to configure your gateway.


You will need the following information:

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

    • API Key from above
    • Password that you selected for the API user


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 (direct debit - not currently enabled for eWAY)

    • 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


Add an eWAY Gateway record in Salesforce (Chargent versions prior to 5.40)

  1. Click on the AppLauncher on the top left side in Salesforce.

  2. eWay App Launcher

  3. In the Search for apps or items box, Search for Gateways and select

  4. eWay App Launcher

  5. Click New and select eWAY as the Gateway Type

  6. Map the following fields in Chargent with your credentials from eWAY:

    • Merchant ID: eWAY API Key from above
    • Merchant Security Key: Password that you selected for the API user

  7. Setup the following Gateway fields

    • Check the Active box - To make the Gateway active
    • Use Tokenization - If you are planning on using eWAY tokenization (recommended)
    • 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 ACH (direct debit - not currently supported on eWAY)
    • 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.

      • Never Clear
      • Clear After Successful Charge
      • Clear After All Transactions
      • Clear When Token is Present (recommended)

      eWay New Gateway

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 charge the card.

    • 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

    eWay Card Types


  • Show Charge Button
  • Show Authorize Button

  • eWay PR Transactions

Your Gateway page should look similar to the figure below. Click the Save button to commit your changes.

eWay Test

Testing the Integration

Now that you have created the eWAY 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 charge credit cards within Salesforce.

Create a Chargent Order in Salesforce to run test transactions

  1. Click on the App Launcher in the top left side and select Chargent as the App.

  2. eWay Launcher

  3. Click the Chargent Orders Tab.

  4. Click on New

  5. Enter in the following information:

    • Account: The Account the Chargent Order should be associated with.
    • Payment Type: should be credit card
    • 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 (check the Manual Charge to enter a specific amount. If you are entering Subtotal, Tax, and Shipping then the Charge Amount will default to the Balance Due and the Manual Charge box does not need to be checked).
    • Credit Card Number = See eWAY’s test credit card information.
    • Card type (Visa, MasterCard, etc..)
    • Card Expiration Month and Card Expiration Year should be in the future

    • Order Source = Telephone

    eWay New Chargent Order

    eWay New Chargent Order

  6. Click Save

  7. Click the Charge button. You will receive a pop-up asking for the CSC (Card Security Code). This can be any 3 digits for Visa, MasterCard or Discover or 4 digits for American Express when testing in the Sandbox.

  8. eWay New Chargent Order

  9. Press the Charge button


You should receive a popup that shows the test transaction was approved.

eWay Transaction Successful

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 eWAY. See the figure below for an example. To view the Transactions associated with the Chargent Order click on the Related tab within the Chargent Order.

eWay New Chargent Order

eWAY Test Cards

The Sandbox allows you to test any valid Visa/MasterCard credit card, however eWAY recommends the following test cards:

  • Visa 4444333322221111
  • MasterCard 5105105105105100


View Transactions in eWAY Sandbox

In your eWAY Sandbox account click on the Home tab.

eWay Transaction

Understanding the Response

If you receive any errors from eWAY, or for more information about the eWAY responses that are saved in the Chargent Transaction record in Salesforce, please see the eWAY Response Codes.

All the data in the Chargent Transaction record in Salesforce comes from eWAY (except for the Transaction name, beginning with TRX-000XXX, which is autogenerated). For more information please see the documentation on Chargent Transactions.

eWay Transaction Response

Complete any additional Salesforce configuration your organization requires

Once you are generating responses from eWAY and seeing the transaction records, you may wish to finalize other Salesforce configuration items, such as:

  • Email receipts from Salesforce and/or eWAY
  • Automated processes in Salesforce driven by transactions
  • Reporting
  • Other requirements of your organization


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.

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 eWAY:

https://api.eWAYpayments.com/soap.asmx

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 with eWAY in Salesforce

Now that you have tested the connection from Salesforce to eWAY, and completed any related configuration steps, you are ready to move into the production phase with Chargent and eWAY.

Go to the eWAY Sandbox gateway record you created earlier, and uncheck the Active field, or delete the record entirely if you choose.

Obtain your Live eWAY API Key and Password

  • Log into your MyeWAY account
  • Hover over the My Account tab at the top of the page, then click Get Connected.
  • Your API Key is already generated and available in the API Key field at the top of the page. You can simply click the Copy To Clipboard button to copy the API Key ready to be pasted into the Chargent Gateway record.
  • To get a password, click Generate Password. A password can only be viewed once after it has been generated, so be sure to copy it (you can use the same Copy To Clipboard button to copy it).

If you previously generated an API Key and Password through the 'User Security' section you can manage as follows:

  • Click on My Account and then go to User Security > Manage Roles
  • Enter a Role Name (such as "API Key") and click Create New Role
  • Go Back to My Account > User Security > Manage Roles
  • Click on Security Role to assign the security role API KEY to the user you will create.
  • Complete all the required fields, including an email address that is NOT the login for MYeWAY, then click Create User
  • Select Actions on the left side of the new user
  • Click View API Key to see and copy the API key to use in Chargent
  • Be sure to use the Rapid API Key and NOT the Pay Now key.

eWay MyeWay

Add the Live Gateway record for eWAY in Salesforce based on either the Gateway Setup Wizard or version 5.40 or earlier instructions above.


Testing the Live eWAY Gateway

We recommend testing at least one real transaction to ensure everything is working correctly in Salesforce, and your merchant account is set up with your bank properly.

You can run a small transaction on your own credit card, and then Void it from the transaction record in Salesforce.

Please note that extensive testing is recommended for the eWAY Sandbox only, as transaction fees may be incurred in the Live environment.

chargent to eway

eWAY Order Source

eWay requires the Salesforce field Order Source to be set in order to process one time charges, or recurring billing using tokenization. For eWAY payments from Chargent, the Order Source field should be set to Telephone. This will send the transaction to eWAY as MOTO, which will allow the token and card information to be stored in eWAY. This allows the token to be used in place of the credit card.

eWAY Token Payments

Chargent supports eWAY Token Payments, which allows you to securely store your customer's account number and other cardholder data with eWAY, and use an associated token in Salesforce for future payments.

PCI compliance scope is reduced since you are not storing the credit card numbers in Salesforce.

You can enable eWAY Token Payments manually if you didn’t already select that option when you initially set up your eWAY gateway.

  1. Go to the App Launcher and search for the Gateway Object.

  2. Select the Gateway Object and the eWAY gateway.

  3. Click Edit and set the following.

    • Check the Use Tokenization checkbox in the Chargent Gateway record you have set up for eWAY

    • Set the Credit Card Handling field (unless you are using Payment Console)

      • Never Clear: Chargent will not remove any card data automatically.
      • Clear After Successful Charge: Chargent will clear the credit card number, expiration dates and card security code only after a successful charge is run.
      • Clear After All Transactions: The credit card number, expiration date and card security code will be erased after any transaction (Charge, Void, Refund)
      • Clear When Token Present (Recommended): Only when a token is present in the token field, will the credit card number, expiration date and card security code be cleared.

The eWAY token is stored in Chargent's Token field in Salesforce after your first successful transaction, and the credit card fields are handled as you specified in the preceding step.

Note that if you are using Chargent’s API, Payment Console or Payment Request, credit cards are never saved to Salesforce but are instead tokenized in memory.


Salesforce to eWAY Field Mapping

Here are some relevant fields and their mappings between the Chargent software in Salesforce and the eWAY system.

Salesforce Direction eWAY
Gateway ID < Transaction Number
Invoice Number > Invoice Reference
Order Information > Invoice Description
Salesforce record ID (of Chargent Order, Opportunity, or Case) > Your Reference Number

Congratulations! You have successfully integrated Salesforce and the eWAY Payment Gateway using Chargent. You can now process one-time or recurring credit card payments through eWAY directly from Salesforce.