We also have some other potential bugs in worldpay.php depending on shop configuration.
line 142 and 143 in the worldpay.php "fix" states
Code:
$callback_url = zen_href_link(FILENAME_WP_CALLBACK, '', 'SSL');
$worldpay_callback = explode('https://', $callback_url);
and further down on line 181 we have this
Code:
zen_draw_hidden_field('MC_callback', $worldpay_callback[1]);
Now this is going to cause problems. Firstly, $worldpay_callback[1] does not work if one is has been forced to manually alter the script to not using SSL, One should have to do this. Really FOR EVERYONE NONSSL OR SSL, then line 143 should be
Code:
$repl = array('http://','https://');
$worldpay_callback = str_replace($repl,'', $callback_url);
and then line 181 should be replaced with
Code:
zen_draw_hidden_field('MC_callback', $worldpay_callback);
There are however still problems. Alan has omitted the $zenId variable that he had previously, so unless the cartId re-established the session in his code (I haven't checked as I have pointed out, I have no worldpay access and so must code using my imagination as to what could happen). then really line 142 should read
Code:
$callback_url = zen_href_link(FILENAME_WP_CALLBACK, zen_session_name() . '=' . zen_session_id(), 'SSL');
The above code does set up an SSL callback, but it's stripped out later and then you enter whether your callback is SSL or not when you enter the details into the worldpay admin interface (well that's what I've understood from the general installation instructions).
Thank you
Philip.
Bookmarks