PrestaShopCorp / ogone

0 stars 7 forks source link

Ogone SHA Error #6

Open morgan-enetb opened 8 years ago

morgan-enetb commented 8 years ago

If there are double space in fields (like address). The SHA is generated with double space in method "calculateShaSign" in Prestashop module. In template, in form's values, the double space are transformed in one space. So, Ogone calculate SHA with one space and SHA does not correspond. It should send value to ogone with double space or remove double space in calculate SHA in Prestashop module.

To test, simply add Two space in address and go to checkout page on Ogone => you should get an error message. Error code obtained on Ogone : unknown order/1/s/

Stigmi commented 8 years ago

Issue confirmed. It happens when "Minify HTML" is enabled in the performance tab of the back office.

The double space is indeed removed in the hidden HTML field and the Shasign calculted by Ogone won't match the one calculated by the module.

We fixed that by always removing extra spaces within the assignOgonePaymentVars function.