Symptom

  • Inline payments fail.
  • In the ops.log this error shows up: "DirectLink::getResponseParams failed: String could not be parsed as XML"

Cause

The transaction feedback from Ingenico contains invalid XML. Maybe the XML structure was broken by special characters which were encoded incorrectly. Because of this, the XML parser cannot read the transaction feedback.


Solution 1

Check that the API user is working correctly, and that username and password are set correctly (no forbidden special characters).


Solution 2

Enable only the following parameters in the Ingenico backoffice (see "Technical Information -> Transaction feedback", sections "Dynamic e-Commerce parameters" and "Directlink Dynamic parameters"):

  • ORDERID, PAYID, NCSTATUS, NCERROR, ACCEPTANCE, STATUS, ECI, AMOUNT, CURRENCY, PM, BRAND, NCERRORPLUS


If Fraud Detection is used, please add these additional parameters:

  • AAVCHECK, CVCCHECK, CCCTY, IPCTY, NBREMAILUSAGE, NBRIPUSAGE, NBRIPUSAGE_ALLTX, NBRUSAGE, VC, CARDNO, ED


Do NOT enable the following parameters in the Ingenico backoffice, because those often contain special characters which can cause problems:

  • CN
  • ECOM_BILLTO_*
  • ECOM_SHIPTO_*


Solution 3

The SSL-library on the server might be broken. This can be tested with the following command:

openssl s_client -connect secure.ogone.com:443

 


The result should show up immediately and contain  certificate-information (certificate chain, server certificate, etc.).  If an error shows up instead or nothing happens at all, this indicates  problems with the SSL-library or the network connection. To make sure of  this, the test can be repeated on a different system.


For more information on the openssl command see this website.


Solution 4

Make sure that the shop doesn't use SSLv3. This version is not supported anymore by the Ingenico platform.


Debugging

To inspect the transaction feedback, you can make the following code change:

  • Open the file app/code/community/Netresearch/OPS/Model/Api/Directlink.php
  • In the method "call" look for this line:
$response = $http->read();
  • Add a Mage::log directly below it so it looks like this:
$response = $http->read();
Mage::log($response, null, 'ops_response.log', true);
  • Now the incoming feedback will always be written to the file "ops_response.log" and can be inspected.
  • Look for special characters or quotation marks that might break the XML structure.
  • Remove this code change as soon as the problem has been resolved!