Ogone

Sana Commerce 8.3
Your provider

Configure a Test Ogone PSP Module

In order to add the Ogone PSP Module to a project, please perform the following steps:

Step 1: Request a test account from Ogone.

Step 2: Copy the 'Sana.Commerce.Payment.Ogone.dll', 'Sana.Commerce.Payment.Ogone.pdb' and 'Sana.Commerce.Payment.Ogone.xml' files from the 'bin' folder of the Ogone release package to the 'Frontend/bin' folder of Sana Commerce.

Step 3: Configure the Sana Commerce frontend to use the Ogone payment module. This configuration is performed in the 'web.config' file of the Sana Commerce frontend:

  • Locate the 'Ogone configuration section.txt' file, which contains the Ogone payment module configuration section;
  • Copy the whole text of this file into the <payment-configuration> section of the 'web.config' file, it will look as follows:
<module name="Ogone" type="Sana.Commerce.Payment.Ogone.OgonePaymentModule, Sana.Commerce.Payment.Ogone">
 <settings>
   <clear />
   <add name="PSPID" value="[PSPID]" isRequestParameter="true" />
   <add name="USERID" value="[USERID]" isRequestParameter="true" />
   <add name="PaymentPage" value="https://secure.ogone.com/ncol/test/orderstandard_utf8.asp" isRequestParameter="true" />
   <add name="ResponseUsePost" value="true" isRequestParameter="false" />
   <add name="PM" value="" isRequestParameter="true" />
   <add name="BRAND" value="" isRequestParameter="true" />
   <add name="WIN3DS" value="" isRequestParameter="true" />
   <add name="PMLIST" value="" isRequestParameter="true" />
   <add name="PMListType" value="" isRequestParameter="true" />
   <add name="Operation" value="" isRequestParameter="true" />
   <add name="homeurl" value="" isRequestParameter="true" />
   <add name="catalogurl" value="" isRequestParameter="true" />
   <add name="backurl" value="" isRequestParameter="true" />
   <add name="TITLE" value="" isRequestParameter="true" />
   <add name="COMPLUS" value="complus_test_data" isRequestParameter="true" />
   <add name="PARAMPLUSKeys" value="id;CurrentUser;" isRequestParameter="false" />
   <add name="PARAMPLUS" value="" isRequestParameter="true" />
   <add name="PARAMVAR" value="" isRequestParameter="true" />
   <add name="SHAalgorithm" value="SHA1" isRequestParameter="false" />
   <add name="SHAInDeliminator" value="[SHAInDeliminator]" isRequestParameter="false" />
   <add name="SHAOutDeliminator" value="[SHAOutDeliminator]" isRequestParameter="false" />
   <add name="SHAOutExcludeParams" value="" isRequestParameter="false" />
   <add name="SHAInExcludeParams" value="" isRequestParameter="false" />
 </settings>
</module>


For an explanation of these configuration values, please read this chapter and the chapter 'Ogone Specific Configuration Values' below and the chapter 'General External Payment Method Configuration Values'.

Step 4: Configure the Ogone payment methods. To do this execute the 'ConfigureOgoneInDB.sql' SQL script on the Sana Commerce database. You can find the script in the 'scripts' folder of the Ogone package.

Before running the script check the value of the '@siteId' variable and change it if needed to match the appropriate website identifier and check whether the currency is correct.

The 'ConfigureOgoneInDB.sql' SQL script adds the 'iDEAL', 'Visa', 'Master Card' and 'PayPal' payment methods. After executing this script the 'iDEAL', 'Visa', 'Master Card' and 'PayPal' payment methods will be available in the Sana Commerce backoffice but you will still need to configure them in the Ogone backoffice > Configuration > Payment methods.

These payment methods will be available for all countries configured in the system. No translations for the payment methods will be set by this script - this should be done manually.

By default the script makes these new payment methods active by setting the 'Active' field value to 'true' in the SQL database.

When the script has been executed, the Ogone payment methods can be seen in the Sana Commerce backoffice > Settings > Payment methods. Here you can manage the payment methods: edit or remove the existing payment methods or create and configure any other payment methods. If you need to use any other payment methods that are supported by the installed payment provider you can create and configure them on the 'Payment methods' page in the Sana Commerce backoffice. For example, if some of the payment methods that are added using the 'ConfigureOgoneInDB.sql' SQL script are not supported in your country or you want to use some other payment methods supported by Ogone, then you can configure payment methods that you need in the Ogone backoffice and then in the Sana Commerce backoffice. Those payment methods that are not needed you can simply remove or disable in the Sana Commerce backoffice. For more information about management of the payment methods in the Sana Commerce backoffice, see 'Payment methods'.

Step 5: Configure the Ogone payment methods in the Ogone backoffice. Log in the Ogone backoffice and go to: Configuration > Payment methods. Here you can add the necessary payment methods:


Add Payment Methods in the Ogone Backoffice

Step 6: Configure the Ogone payment methods in the Sana Commerce backoffice > Settings > Payment methods. If you add some other payment methods, different from those that are added by the 'ConfigureOgoneInDB.sql' SQL script, you should also create and configure them in the Sana Commerce backoffice.
For the detailed information about how to configure payment methods in the Sana Commerce backoffice, see 'Payment Methods'.

When you create the Ogone payment methods in the Sana Commerce backoffice you should specify 'PSP code' and 'PSP profile name' for each payment method. They should match the identifiers of the appropriate payment methods in the Ogone backoffice ('PSP code' should match 'PM' and 'PSP profile name' should match 'Brand' values).

The 'Brand' values can be seen in the Ogone backoffice on the payment methods page: Configuration > Payment methods.
The proper 'PM' values can be found in the Ogone documentation. You should log in the Ogone backoffice and then click: Support > Integration & user manuals > Technical Guides > Parameter Cookbook. Find the 'PM' field name in the table and in the 'Details' column you can see the links to the list of the 'Brand' and 'PM' values for the test and production environments.

'PSP code' ('PM') and 'PSP profile name' ('Brand') values in the Sana Commerce backoffice payment methods configuration should be specified in the format shown on the screenshot below:


Configure Payment Methods in the Sana Commerce Backoffice


Step 7: In the Ogone package find the 'files' folder, where the Ogone payment methods icons are stored. This folder contains the icons for the 'iDEAL', 'Visa', 'Master Card' and 'PayPal' payment methods that are added by the 'ConfigureOgoneInDB.sql' SQL script. Copy the 'files' folder into the 'Frontend\content\' directory. If you need the icons of some other payment methods you can find them either in the Ogone backoffice or in the internet and add them to the 'Frontend\content\' directory.

These icons will be displayed on the frontend in the payment method selection control.

Step 8: In the Ogone configuration section in the 'web.config' file of the frontend modify the PSPID to your affiliation name in the Ogone system.

Step 9: Log in the Ogone backoffice, go to Configuration -> Technical information and perform the following configurations:

Global transaction parameters
Default operation code Select 'Sale'.
Processing for individual transactions Select 'Online but switch to offline in intervals when the online acquiring system is unavailable.'
Global security parameters
Compose the string to be hashed by concatenating the value of Select 'Each parameter followed by the passphrase.'
Note, that the option 'Main parameters only' is no longer supported for the new Ogone accounts. But for the old accounts it is still present. This is because this option uses the older method of SHA encoding. Therefore, when you create a new Ogone account, it is automatically set to 'Each parameter followed by the passphrase'.
Hash algorithm Select one of the hash algorithms (SHA-1, SHA-256 or SHA-512) in order to comply with the highest data security standards. The selected value should match the value set in the 'web.config' file of the Sana Commerce frontend. By default SHA-1 is set in the Ogone configuration section in the 'web.config' file of the Sana Commerce frontend. If you select any other hash algorithm in the Ogone backoffice you should also change it in the 'web.config' file of the Sana Commerce frontend.
Payment Page layout
No obligatory settings are required.
Data and origin verification
Checks for e-Commerce:
SHA-IN Pass phrase
Should match the [SHAInDeliminator] value in the 'web.config' file of the Sana Commerce frontend.
Transaction feedback
HTTP redirection in the browser
  • Check 'I want to receive transaction feedback parameters on the redirection URLs.'
  • Check 'I want Ogone to display a short text to the customer on the secure payment page if a redirection to my website is detected immediately after the payment process.'
Direct HTTP server-to-server request
  • Always deferred (not immediately after the payment)': this option should be set only on the Beta/Live environment.
    The feedback request will be sent shortly after the end of the payment process.
  • 'Always online (immediately after the payment to allow customization of the response seen by the customer)': this option should be set only on the Test environment.
    The feedback request will be sent online sometime between Ogone system's receipt of the acquirer's response and the time it notifies the customer of the payment result.
    In this case, the payment process takes longer for the customer, but the merchant can send a personalized response to the customer.
URL of the merchant's post-payment page Set full path to the payment confirmation page in both fields:
http://[WEBSITE_DOMAIN]/confirm/payment
or
https://[WEBSITE_DOMAIN]/confirm/payment
This path should be specified only for Beta/Live environment.
Request method Select 'POST'.
General Check 'I want Ogone to re-launch the "end of transaction" (post-payment request/redirection) process if required.'
SHA-OUT Pass phrase Should match the [SHAOutDeliminator] value in the 'web.config' file of the Sana Commerce frontend.
HTTP request for status changes Check 'No request.'
Transaction e-mails
E-mails to the merchant Specify the e-mail addresses to which the information messages from Ogone should be sent. Determine what type of messages you want to receive.
Test Info
Information about test card numbers or amounts are set on this tab.

Step 10: In the 'web.config' file of the Sana Commerce frontend specify the values of the 'SHAInDeliminator' and 'SHAOutDeliminator' parameters. Make sure that these values are exactly the same as set in the Ogone backoffice.

Step 11: Test the payment/ checkout flow to see if everything works using the newly configured payment methods and the correct payment statuses that are set.

To test the payment flow on the development environment:

The development machine/server cannot be accessed externally by the Ogone server (most common scenario): in this case add all domains used by the development server in the 'DebugDomains' setting in the 'web.config' file. Multiple domains can be separated by the ',' character. This will make it possible to test the whole flow of a test payment, when the confirm page cannot be reached by Ogone. This setting is for debugging purposes only and should not be used in any live situation.