Documentation

Ucommerce includes full API reference documentation and lots of helpful articles to help you build your e-commerce site as effortlessly as possible.

Topics Payment Providers
v7.18

Setup Ucommerce to Include Secure Trading as a Payment Method

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

With Secure Trading you can: Authorize, Instant acquire, Cancel and Refund payments.

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 “Secure Trading”.

image
  • Click the newly created node and select “Secure Trading” in the Service drop down list.
  • Next select Checkout in the pipeline drop down.
  • 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”.
image

That’s everything in the Ucommerce interface.

Settings in Secure Trading

Now you need to login to https://myst.securetrading.net/ to configure the gateway to match our needs. There's several options. We need to configure Payment page redirects. Please note that Ucommerce does not support notifications out of the box.

image

configuring conditions and actions for payment redirects.

The first thing to setup is payment page redirects. You need to create a new condition and a new action which will result in payments running back to your site. image

Creating a condition

When creating the new condition make sure to check off ALL checkboxes in: Accounts,Payment types,Error codes and Currencies. In Requests you will only want to check off Auth. These settings ensure that every auth request regardless of state will trigger a new action (redirect to your page)

image

Creating the acion

Now you need to configure the action, which is the url that you want to be redirected to.

you want the url to match: http://<yoursite.com>/<paymentmethod-name>/PaymentProcessor.axd

You need to replace <yoursite.com> with domain of your site. In my case it's u6 You need to replace <paymentmethod-name> with the name of the payment method you created. In my case i used 'Secure Trading' so i wan't the name to be 'Secure%20Trading'. For simplicity you can set the name to be without spaces or any special characters. You can use Display Name to present it in a prettier way for the customer.

The final Url for me would be: http://u6/Secure%20Trading/PaymentProcessor.axd

Under field selection you must in custom fields add 'paymentreference' and 'AuthRequestParameter' Under field selection in 'standard fields' you must check the following:

  • acquirerresponsecode
  • acquirerresponsemessage
  • acquirertypedescription
  • authcode
  • errorcode
  • mainamount
  • orderreference
  • securityresponsepostcode
  • securityresponsesecuritycode
  • settlestatus
  • sitereference
  • status
  • transactionreference
image
image

Contact Secure Trading to setup hashing and xml requests

You must now notify SecureTrading that you want to process payments through payment pages using http post and make requests using xml in their webservices. Unfortunately you must contact support and cannot configure this yourself.

You need to tell them your sitereference and which keys they should include in the hash.

The keys you want them to include in the following order is (this part is important):

  • currencyiso3a
  • mainamount
  • orderreference
  • sitereference
  • settlestatus
  • password

For this you need to contact their support at [email protected].

The result is a password that you need to save for later use (the last parameter used in the hash).

You also want to contact support to setup XML webservice credentials used for transaction update (capture and cancel) and refund requests. They will setup a username and password that you also need to save for later use.

Configuration settings

The last thing you need to configure is the configuration file for Secure trading which is found under:

websiteroot\Website\sitecore modules\Shell\ucommerce\Configuration\Payments\SecureTrading.config (For Sitecore) websiteroot\Umbraco\ucommerce\Configuration\Payments\SecureTrading.config (For Umbraco)

The parameters you need to set is:

  • siteReference="The site reference for the payment configuration."
  • acceptUrl="The url that the user will be redirected to when the authorization process went well"
  • declineUrl="The url that the user will be redirected to if the authorization process are declined by Secure Trading"
  • debug="true if you're in testing/stating environement. Otherwise false for production"
  • key="The key to be included in the hash. Provided by Secure trading."
  • webServiceAlias="webservice alias to be used for authentication in web service requests. Provided by Secure trading."
  • webServicePassword="webservice password to be used for authentication in web service requests. Provided by Secure trading."
  • instantCapture="if you want to deffer the settlement of money untill the order status changes in Ucommerce it should be set to false."
image

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. Simply remove the comments on ToCompleted.AcquirePaymentTask and ToCanceled.CancelPaymentTask The pipeline configuration is found in /ucommerce/pipelines.

ToCancelled.config

image

ToCompletedOrder.config

image