Ogone PSP

Sana Commerce 8.2
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="accepturl" value="checkout/ordersubmit.aspx" isRequestParameter="true" />
    <add name="declineurl" value="checkout/orderfailed.aspx" isRequestParameter="true" />
    <add name="exceptionurl" value="checkout/orderfailed.aspx" isRequestParameter="true" />
    <add name="cancelurl" value="checkout/ordercancelled.aspx" 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. There are two ways to do this:

  • Configure the Ogone payment methods in the Sana Commerce backoffice. For more information read this chapter.
  • Configure the Ogone payment methods by executing the 'ConfigureOgoneInDB.sql' SQL script on the Sana Commerce database.
Before executing the script make sure that you have changed the '@siteId' variable (if needed) to match the appropriate website identifier and check whether the currency is correct.

The 'ConfigureOgoneInDB.sql' SQL script will add the 'iDEAL', 'Visa', 'Master Card' and 'PayPal' 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.

Step 5: In the Ogone package find the 'files' folder, where the Ogone payment methods icons are stored. Copy the 'files' folder into the 'Frontend\content\' directory.

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

Step 6: 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 7: Log into 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
Hash algorithm Select 'SHA-1'. This value should match the value set 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]/checkout/paymentconfirm.aspx
or
https://[WEBSITE_DOMAIN]/checkout/paymentconfirm.aspx
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 8: 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 9: In the Ogone backoffice go to 'Configuration -> Payment methods' and configure the payment methods.

Step 10: In the Sana Commerce backoffice -> Settings -> Payment methods, check that correct values are set in the 'PSP code' and 'PSP profile name' fields for Ogone payment methods. They should match the identifiers of the appropriate payment methods configured in the Ogone backoffice ('PSP code' should match 'PM' and 'PSP profile name' should match 'Brand' values).

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.

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.