Loutka,
The following lines of code define the value of the callback URL which is passed to WorldPay as "MC_callback"
includes/modules/payment/worldpay.php lines 128 and 129
and at line 148Code:$callback_url = zen_href_link(FILENAME_WPCALLBACK, $zenId); $worldpay_callback = explode('http://', $callback_url);
The function zen_href_link() is defined in includes/functions/html_output.php as follows:Code:zen_draw_hidden_field('MC_callback', $worldpay_callback[1]);
If any of the variables are not included then the default value is used so basically line 128 defines $callback_url as the full non-ssl path to the callback script as defined (FILENAME_WPCALLBACK). This might look something like this:Code:zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true)
Note $zen_id is not strictly required since this is the session_id which by default is included anyway hence it is included twice in the url.Code:http://www.yourdomain.com/index.php?main_page=wpcallback&zenid=2e9b83e61e7dd9d3c63ea1bb15e0b58f&zenid=2e9b83e61e7dd9d3c63ea1bb15e0b58f
Line 129 splits $callback_url into an array with two values:
and line 148 passes $worldpay_callback[1] to WorldPay as "MC_callback"Code:$worldpay_callback[0] = http:// $worldpay_callback[1] = www.yourdomain.com/index.php?main_page=wpcallback&zenid=2e9b83e61e7dd9d3c63ea1bb15e0b58f&zenid=2e9b83e61e7dd9d3c63ea1bb15e0b58f
Therefore the short answers to WorldPay's questions are that neither http:// nor https:// is passed in the value of MC_callback and it is not $callback_url that populates MC_callback but $worldpay_callback[1].
If you want to pass a secure URL as MC_callback you firstly must have SSL set up on your server and SSL enabled and your secure path defined in your configuration files. Lines 128 and 129 then become:
This sets $callback_url to something like:Code:$callback_url = zen_href_link(FILENAME_WPCALLBACK, $zenId, 'SSL'); $worldpay_callback = explode('https://', $callback_url);
and $worldpay_callback[1] becomesCode:https://www.yoursecuredomain.com/index.php?main_page=wpcallback&zenid=2e9b83e61e7dd9d3c63ea1bb15e0b58f&zenid=2e9b83e61e7dd9d3c63ea1bb15e0b58f
and this is passed to WorldPay as MC_callback.Code:www.yoursecuredomain.com/index.php?main_page=wpcallback&zenid=2e9b83e61e7dd9d3c63ea1bb15e0b58f&zenid=2e9b83e61e7dd9d3c63ea1bb15e0b58f
Of course if you are using secure callback you must set the callback URL in you WorldPay control panel as https://<wpdisplay item="MC_callback">
I hope this explains things,
Alan



