User GuideSetup

Payment Methods

Sana Commerce 9.0
Your connector

Docdata

Docdata is an international online payment provider which offers a payment service that is the solution to secure and easy payments. Docdata Payments ensures that your customers' online payments are processed securely, quickly and correctly. This means that the entire payment process is taken out of your hands, from the point where your customer places an order in your online shop, to the moment the payments are processed in your financial records.

To configure the Docdata payment provider and payment methods you should have the Docdata test/ live account with all the necessary data.

The table below provides the description of the Docdata payment provider fields:

Field Description
merchant_name The name of the account that will be used by Docdata to process the payment. This information will be supplied by Docdata when creating the account (test/live).
Default value: depends on the PSP account (test/ live)
merchant_password The password of the account that will be used by Docdata to process the payment. This information will be supplied by Docdata when creating the account (test/live).
Default value: depends on the PSP account (test/ live)
paid_status_check_mode The mode of the order paid status check. This value tells Sana Commerce how the status of the order should be checked. There are three possible values: quick, safe or custom. The default value is quick. Each value stands for its own algorithm of the status check.

quick - when this value is set, Sana Commerce will perform a quick check of the order paid status. In this case Sana Commerce sums up total shopper pending, total acquirer pending and total acquirer authorized amounts and checks whether this sum is equal to the total amount which was registered for this order. This option is the fastest but it does have the risk that some payments will actually not have been made yet.

safe - in this case Sana Commerce will perform a safe check of the order paid status. Sana Commerce checks that the total captured amount is equal to the total amount which was registered for this order. Although it is the safest check, the downside is that it can sometimes take a long time for the acquirer to actually have the money transferred and captured.

custom - this value can be set if a custom check needs to be implemented. In the current implementation the custom check just invokes the quick check. But it is intended to be overridden by the end-developers so that a new custom check can be performed.

maximum_orderlines_to_send Limits the maximum number of order lines to be sent to Docdata Order API.
Default value: 100

The Docdata payment menu page can display information about the order including the list of order lines. Sana Commerce sends this list of order lines to the Docdata Order API every time a new payment gets started for the order in Docdata. It can be the case that customers post orders with the large amount of order lines and the data traffic between Sana Commerce and Docdata Order API gets increased significantly. This can also cause other issues, like inability to load the Docdata payment menu page in the user's browser, etc.

Use this setting to limit the number of order lines to be sent to Docdata. If this number is exceeded for some order, Sana Commerce will send only one order line to Docdata containing only total amount of the order instead of sending all order lines.

This value can be empty. In such case all order lines will be sent to Docdata.

days_pay_period The amount of days the user will have to pay the order. For more information about this field, please refer to the Docdata documentation. This configuration value is required for the Docdata payment module.
Default value: 14

Log in the Docdata admin panel and configure or verify payment profiles. To access the payment profiles in the Docdata admin panel click: Settings > Payment method names. Each payment method must be configured with a profile. You can find the configured profiles in the following place in the Docdata admin panel (marked by the red box).


Configuring Payment Methods in the Docdata Admin Panel

The configured in the Docdata admin panel payment methods with the related profile names will be needed to set up the payment methods in Sana Admin.

Configure the correct URLs in the Docdata backoffice under: Settings > View/Edit Merchant Profile > URL.


Configuring URL Settings

Configure URLs in the following way:

Name Value
Return URL success http://<domain>/checkout/ordersubmit?id=
Return URL canceled http://<domain>/checkout/orderfailed?id=
Return URL error http://<domain>/checkout/orderfailed?id=
Return URL pending http://<domain>/checkout/ordersubmit?id=
Update URL http://<domain>/confirm/payment?id=

When Docdata is configured you can set up the necessary payment methods in Sana Admin that are supported by Docdata.

For information about how to create and configure payment methods in Sana Admin, see 'Payment methods'.

Test the payment/checkout flow to see if everything works fine using the created payment methods and the correct payment statuses.

When everything is done and tested, keep an eye on the payment log in the following days to be sure that everything is configured correctly and that every PSP status is covered.

It may be the case that on the payment menu page of Docdata you will face with the incorrect positioning of product images as shown on the screenshot below:


Docdata Payment Window

On the screenshot above you can see two incorrectly positioned image placeholders with the 'No image available' text on them. If you have encountered the problem with positioning of product images on the payment menu page of Docdata:

  • Open the Docdata backoffice and click: Settings > Edit Look and Feel.
  • In the large editable text box add the following lines (this text box may already contain some lines of text - these are the CSS stylesheets which are applied by Docdata to the payment menu page):
    productImage {
      height: 50px;
    }

  • Click Store CSS at the bottom of the page to save your changes.
  • Now when this fix has been applied the payment menu page of Docdata should look correctly.

In this fix the height of images is set to 50 pixels, but you can set it to any value suitable for your project.

User GuideSetup