# Monday, 18 October 2010

uCommerce comes with built-in support for ePay payments. This guide will walk you through getting uCommerce to work with ePay for payment processing.

Authorization is available for all plans with ePay, i.e. Light, Pro, and Business. If you wish to acquire (capture), refund, or cancel payments ePay requires you to buy the Business plan.

Settings in uCommerce

Add a new payment method, under “uCommerce –> Settings –> Orders –> Payment Methods”. You can call it whatever you like, here I have used “ePay”.


Click the newly created node and select “ePay” in the Service drop down list. Fill out the rest of the required information, like where its available from under the “Access” tab, pricing and the language tabs. When you are done click “Save”.


That’s everything in the uCommerce interface.

Settings in ePay Administration Panel

Changes needed in the ePay administration panel, so it will work with uCommerce.

Unikt orderID, MD5 sikkerhedstjek & callback setting

On the Menu on the left, click “Indstillinger–> Betalingssystemet”, then you should get a view like the one below. These are the settings we recommend. Make a random key out of some digits/characters.


On the same page you need to enter the domain that the callbacks is made to. This include all subdomains.


Optional: Webservice setting if you need to Acquire, Cancel, and Refund

1. Now on the menu to the left, go to “API / Webservices –> Adgang”

2. Set a password if you are using a shared hosting environment

3. At the bottom type in the “IP address” of the webhost accessing the webservice. This needs to be the external ip address

4. Click “Opret IP-adresse” to save it


Editing the ePay.config File

Now we need to edit the ePay.config file.

You will find the ePay.config file in the following location, where “rootdir” is the directory on the computer where you installed Umbraco: “rootdir\umbraco\UCommerce\Configuration\ePay.config”. Usually “rootdir” is c:\inetpub.


Some of the below information are found in the ePay administration panel, so start by logging in you aren’t already.

Finding debug

If set to “True” you will be prompted to click a button before posting the information to “ePay” otherwise it will do an autosubmit using Javascript. When running in production, you will want this set to “False”.

Finding callback

Leave this at “(auto)” if in doubt.

Finding acceptUrl

Url the user is returned to after successfully authorizing her credit card.

Finding declineUrl

Url the user is returned to if she cancels a purchase.

Finding merchantNumber

The “Indløsningsnummer” is unique for your account. This can be found in the menu “Indstillinger -> Betalingssystemet”. Also make sure that “Test mode” is not active, like it is on the picture below, if you’re setting up a production environment.


Optional: Finding pwd if you need to Acquire, Cancel, or Refund

Password used for the webservice, if using a shared host. This can be found in the menu “API / Webservices -> Adgang”.


Finding useMd5

True/False indicating weather to use Md5. Its recommended to use Md5 for security reasons.

Finding key

The Md5 key set in the administration panel.

This can be found in the menu “Indstillinger–> Betalingssystemet”.


Executing a Pipeline on Callback

Running a pipeline once payment is authorized can be helpful if you need to complete the order once the customer returns to your site.

To run a “pipeline” once the callback if received and processed, you need to modify the database. If you used the name “ePay” for the payment method name, you can run this SQL query in the SQL Server Management Studio.

UPDATE uCommerce_PaymentMethod SET Pipeline = 'Checkout' WHERE Name = 'ePay'

or just edit it manually in SQL Server Management Studio.


Now the default piplline that comes with uCommerce will be run after each successful callback. This sets the Basket to an Order, gives it an OrderNumber, and other things.

Optional: Enable Acquire, Cancel, and Refund in uCommerce Back Office

To be able to acquire, cancel, and refund payments you need to enable two pipeline tasks in the ToCompletedOrder pipeline and ToCancelled pipeline.

The pipeline configuration is found in /umbraco/ucommerce/pipelines.






· Test mode – Make sure test mode if turned off when going live.

Comments are closed.