Closed emily-d closed 11 years ago
SIPS silent response should not be routed to tggatos.php but directly to /modules/tggatos/controllers/front/silentresponse.php
, which does instanciate the module.
It seems like initContent() is not called on the controller.
I don't remember why I did overrid initContent(), not sure it's the best function to override in this controller.
Did you check you PHP error log ? There should be an answer there. Among the alerts about the deprecated isLoggedBack() call I have to fix.
Right now, I can't check the server logs, but using an error handler function, the only errors I spotted were :
Function isLoggedBack() is deprecated in /www/modules/tggatos/tggatos.php on line232 in file /www/classes/Tools.php on line : 1777
filemtime(): stat failed for /wwwall in file /var/www/classes/Media.php on line : 228
The second error seems benign.
Fatal errors cannot be handled afaik.
You've not to check server logs, if you aren't host machine administrateur just relocate error_log
within a VirtualHost
, .htaccess
or .user.ini
, or using ini_set()
in _PS_MODE_DEV_
mode specific area of config/defines.inc.php
, and set _PS_MODE_DEV_
on during at least a silent response.
I think I’ve found my problem. In silentresponse.php, $ssl is set to true but AUTO_RESPONSE_URL is set to an http address not httpS.
So when the ATOS server sends the automatic response, my server returns a 301 and the POST request is lost.
Setting $ssl to false, solves the problem. As I remember, ATOS demands that the automatic response is not received by https, so no big deal.
Thanks for reporting back, I'll consider making a workaround to avoid Prestashop redirecting the request (most probably by setting SSL configuration to off for this single request in class Configuration static cache) if it can be achieved without overload (Modules should avoid overloading anything).
I can confirm, on a brand new PrestaShop 1.5.4.1, if you have $ssl to true auto-response is not dealt. It is if you set it to false.
@emily-d sorry I did misunderstand your report, @e-gaulue thanks for pointing this again
The TggAtos class in tggatos.php only calls its constructor when receiving the automatic response from the ATOS server (pat-sips-vdm.sips-atos.com). Nothing happens after that. Consequence, the order is not processed.
The ATOS server POST request is passed correctly to tggatos.php, but something is missing to trigger the dispatching, I guess. I was able to fix this issue with this hack :
Also, this is a bit more tricky cause a direct POST via CURL will not display this behavior:
/modules/tggatos/controllers/front/silentresponse.php is correctly called after tggatos.php.
Info: