HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

DataCash installation and configuration

This topic describes how to install and use the DataCash payment provider, one of several Optimizely Commerce Cloud payment solutions.

Deployment

Follow these steps to deploy the DataCash payment provider.

Build a DataCash project

  1. Download the DataCash payment provider file package, which provides an EPiServer.Business.Commerce.Payment.DataCash project.
  2. Open the DataCash project and and save the solution.
  3. Install EPiServer.Commerce.Core NuGet package by executing this command in Package Manager Console:
    Install-Package EPiServer.Commerce.Core

📘

Note

To avoid assembly conflicts, install the Optimizely Commerce Core version that your site is using. Also, apply no database transforms.

  1. If you are using a live account, uncomment the following line to activate the real-time fraud checking (in the DataCashPaymentGateway class, CreateDocumentForPreAuthenticateRequest method):

    requestDoc.set("Request.Transaction.TxnDetails.The3rdMan.Realtime.real_time_sha1", HashCode(merchantReference));
    

🚧

Important!

If you are using Commerce 11 or higher, ignore step 5. That code was removed from Commerce 11.

  1. If you are using workflow, uncomment the following line in DataCashPaymentGateway.cs.

    payment.Properties["NextAction"] as Action).Invoke();
    
  2. Rebuild the DataCash project. Now, you have the files EPiServer.Business.Commerce.Payment.DataCash.dll and Transaction.dll.

The project package includes these files.

FileDescription
DataCashPayment.csrepresents payment class for DataCash
For Commerce versions 10.5 and 11

DataCashPaymentOption

For Commerce 12 versions and up

DataCashPaymentMethod.cs
represents a payment method for DataCash
Transaction.dll library file
DataCashPaymentGateway.csmain payment gateway business
DataCashPaymentMetaClass.xmlcontains payment meta class
DataCashPaymentController.csthe page controller
XML files in lang folderlanguage files
CountriesCodes.txtresource files
ConfigurePayment.ascx,
EditTab.ascx and its ascx.cs, ascx.designer.cs
Commerce Manager payment editor
PaymentMethod.ascx
and its ascx.cs, ascx.designer.cs
front-end webform view
For Commerce versions 10.5 and 11

_DataCashPaymentMethod.cshtml, _DataCashConfirmation.cshtml

For Commerce 12 versions and up

_DataCash.cshtml,
_DataCashConfirmation.cshtml
front-end mvc view
DataCashConfiguration.cs,
DocumentHelpers.cs,
RequestDocumentCreation.cs,
CountryCodes.cs
helper classes
DataCashPage.csthe page type
DataCash-logo.jpglogo, in images folder

Commerce Manager

  1. Find the Commerce Manager Apps folder, located under the Optimizely Commerce Manager project folder.
  2. Deploy the ConfigurePayment.ascx file to the Apps\Order\Payments\Plugins\DataCash folder. Create the DataCash folder if it does not exist.
  3. Deploy the EditTab.ascx file to the Apps\Order\Payments\MetaData\DataCash folder. Create the DataCash folder if it does not exist.
  4. Deploy Transaction.dll and EPiServer.Business.Commerce.Payment.DataCash.dll to your Commerce Manager site's bin folder.

Front-end site Webform (Sample site)

  1. Deploy PaymentMethod.ascx to the website's Templates\Sample\Units\CartCheckout\DataCash folder.
  2. Deploy DataCash-logo.jpg to your website's styles\images folder.
  3. Deploy all files in lang folder to the Commerce Sample site's lang folder.
  4. Deploy Transaction.dll and EPiServer.Business.Commerce.Payment.DataCash.dll to the Commerce Sample site's bin folder.

Front-end site MVC (Quicksilver)

  1. Deploy DataCash-logo.jpg to your website's styles\images folder.
  2. Deploy all files in lang folder to the Quicksilver site's lang folder.
  3. Deploy Transaction.dll, EPiServer.Business.Commerce.Payment.DataCash.dll to your Quicksilver site's bin folder.
  4. Deploy _DataCashConfirmation.cshtml and _DataCash.cshtml to your website's *Views\Sharedfolder.

(Optional) The following steps allow the creation of a DataCashPage under a Checkout page:

a. In your solution's front-end site project, add references to the deployed .dlls.
b. Open the **CheckoutPage** page type in *Features/Checkout/Pages*.
c. Add **DataCashPage** type to **AvailableContentTypes** attribute.


        [AvailableContentTypes(Include = new [] { typeof(OrderConfirmationPage), typeof(MultiShipmentPage), typeof(DataCashPage) }, IncludeOn = new [] {typeof(StartPage)})]
4. Rebuild the Quicksilver project.

DataCash configuration

Setting up the DataCash payment provider in Commerce Manager

🚧

Prerequisite

You have a DataCash account registered at DataCash website.

After deploying all necessary files, open the Optimizely Commerce Manager back-end site. Then, follow these steps.

  1. Go to Administration > Order System > Payments > English (United States). The last option is the language in which you want to make the DataCash payment available.
  2. Select Create new payment method
    • For System keyword, enter DataCash, the name of the folder created during deployment.
    • For Class Name, select EPiServer.Business.Commerce.Payment.DataCash.DataCashPaymentGateway.
    • For Payment Class, select EPiServer.Business.Commerce.Payment.DataCash.Orders.DataCashPayment.

Overview tab

586586
  1. Click OK to save the DataCash payment method.
  2. Open the DataCash payment method for additional editing.
  3. Go to the Parameters tab and enter the following:
    • Host address. The URL of the DataCash server to which to send transactions (required).
    • vTID. DataCash account number (required).
    • Password. Password for vTID (required).
    • Log file. The log file to which the API writes the output log. The folder that contains the log file should be available. Make sure that the IUSR and IIS_IUSRS have modify permission for this file. If you do not set the log file, no logging occurs.
    • Time out. Number of seconds for transaction time out. If you do not set a time out, the default is 60 seconds.
    • Logging level. The level that should be logged.
    • Payment page Id. The ID of the payment page (configured by DataCash) that you want to display.
    • Proxy. The URL of a proxy to connect through. If you do not set a proxy, the server's default proxy is used.

*Parameters tab

663663
  1. Open the Markets tab and add the expected markets for this payment.

Markets tab

683683
  1. In Commerce Manager, navigate to Administration > Order System > Meta Classes.
  2. Click Import MetaData to populate the MetaData import screen.
  3. Select the DataCash/DataCashPaymentMetaClass.xml file to import.

📘

Note

For testing purposes, manually request DataCash to activate HPS and the 3rd Man service. (These services are not configured by default. Also, the 3rd Man service is available for live accounts only.)

Setting up DataCash payment provider in the front-end site

To set up the DataCash payment provider, browse to the front-end Commerce site and follow these steps.

1. Navigate to the **CMS > Admin > Content Type** tab.
2. Add two properties, **DataCashPaymentPage**, **DataCashPaymentLandingPage** of the type Page, to the Start page (or Home page) page type.   

Common settings tab

803803
3. Navigate to **CMS > Edit**.
4. Create a page using a **DataCash Payment Page** under a **Checkout** page, then publish it.   
379379
5. Open the site's home page, click the **Site Structure** tab and define two new properties:
    - Set the **DataCashPaymentPage** property to the DataCash page that was just created.
    - Set the **DataCashPaymentLandingPage** property to Order confirmation page.  

Site Structure tab

10351035

Configuring the DataCash hash key (optional)

DataCash uses a private hash keyto ensure security in communications. This private hash key is used to create secure hash keys, which are appended to an accept URL and a cancel URL.

The information about accept URL and cancel URL is sent to DataCash using HTTPS, so these keys are not exposed. When DataCash redirects a user to those URLs, the keys verify that the request comes from DataCash only, since only DataCash knows about the keys. You can configure this hash key in the application settings configuration section under DataCashHashKey.

689689

DataCash user experience

After you deploy the files and configure the DataCash Payment module on your Optimizely Commerce website, a DataCash option should appear in your checkout page. This section explains how a user interacts with PayPal.

  1. During checkout, on the checkout page, select DataCash as the payment method.
398398
  1. When you click Place order, you are redirected to DataCash.com to confirm the payment.
643643
  1. When you finalize the approval process, you are redirected to the Order confirmation page (previously configured).
12021202

📘

Note

DataCash.com checks billing and shipping addresses very carefully. If you test with a US address, use a correct and complete one with ZIP code, state, and city. Otherwise, the DataCash API precheck fails, and you cannot complete the payment.