Had callback in 2.2 working for RBS worldpay junior installation after making sure I had the latest junior_callback.php file in ext/modules. Have now upgraded to 2.3. There is no junior callback mod with the default package and I can't find a contrib for worldpay junior that is for 2.3. The mod that ships with 2.3, called "RBS WorldPay Hosted" seems to work with the Select Junior installation that I have, except for the callback. Although callback was working in test mode...
Any help much appreciated...
Latest News: (loading..)
RBS worldpay junior for 2.3
Started by justinswaa, Jun 07 2011, 08:11
3 replies to this topic
#1
Posted 07 June 2011, 08:11
#2
Posted 07 June 2011, 13:39
or maybe the junior callback mod from 2.2 will work on 2.3. Has anybody tried that?
#3
Posted 09 June 2011, 14:28
Ello,
Couple of points.
1: WorldPay Hosted and WorldPay Junior are the same thing (That's marketing for you) .
Since the release of the OSC 2.3 WorldPay has changed their payment URLs so the URL's contained in the default WorldPay Modules will need updating. (The official response was "The old URL's may or may not work all the time")
From https://select.wp3.rbsworldpay.com/wcc/purchase
To https://secure.wp3.rbsworldpay.com/wcc/purchase
2: OSC 2.3 ext/modules/payment/hosted_callback.php still contains deprecated code. Depending on your server it could fail on the very first line of code (line 13)
if (isset($HTTP_POST_VARS['M_sid']) && !empty($HTTP_POST_VARS['M_sid'])) {
There are compatibility functions within OSC that will check if $HTTP_POST_VARS is valid/supported and if not change them to the new standard $_POST, however the line of code that does this is executed AFTER if (isset($HTTP_POST_VARS['M_sid']) && !empty($HTTP_POST_VARS['M_sid'])) {
So line 13 (or 1 depending on your perspective) checks to see if M_sid value is set and not empty, if it's set and exists it moves on and on line 15 (or 3) includes application_top.php which will then start the compatibility code conversions. That's not going to help if you continuously fail at line 13 (or 1).
So change the above to $_POST.
Make sure you have set up different order status for prepairing and successful WorldPay transactions.
Check the field (in html source code) of checkout_confirmation.php to make sure the field MC_callback contains a valid return link.
Make sure your "Production/Live" configuration in your WorldPay configuration is set up correctly. If your test environment works then just copy the settings from your "Text/Development" WorldPay configuration settings (at the bottom of the page in your WorldPay control panel) to the "Live/Production".
Also just so you know if your callback page is being accessed by WorldPay you could insert code to the top of your callback page which will send you an email when it's being accessed with the post values (see below).
Good Luck!
Couple of points.
1: WorldPay Hosted and WorldPay Junior are the same thing (That's marketing for you) .
Since the release of the OSC 2.3 WorldPay has changed their payment URLs so the URL's contained in the default WorldPay Modules will need updating. (The official response was "The old URL's may or may not work all the time")
From https://select.wp3.rbsworldpay.com/wcc/purchase
To https://secure.wp3.rbsworldpay.com/wcc/purchase
2: OSC 2.3 ext/modules/payment/hosted_callback.php still contains deprecated code. Depending on your server it could fail on the very first line of code (line 13)
if (isset($HTTP_POST_VARS['M_sid']) && !empty($HTTP_POST_VARS['M_sid'])) {
There are compatibility functions within OSC that will check if $HTTP_POST_VARS is valid/supported and if not change them to the new standard $_POST, however the line of code that does this is executed AFTER if (isset($HTTP_POST_VARS['M_sid']) && !empty($HTTP_POST_VARS['M_sid'])) {
if (isset($HTTP_POST_VARS['M_sid']) && !empty($HTTP_POST_VARS['M_sid'])) {
chdir('../../../../');
require ('includes/application_top.php');
So line 13 (or 1 depending on your perspective) checks to see if M_sid value is set and not empty, if it's set and exists it moves on and on line 15 (or 3) includes application_top.php which will then start the compatibility code conversions. That's not going to help if you continuously fail at line 13 (or 1).
So change the above to $_POST.
Make sure you have set up different order status for prepairing and successful WorldPay transactions.
Check the field (in html source code) of checkout_confirmation.php to make sure the field MC_callback contains a valid return link.
Make sure your "Production/Live" configuration in your WorldPay configuration is set up correctly. If your test environment works then just copy the settings from your "Text/Development" WorldPay configuration settings (at the bottom of the page in your WorldPay control panel) to the "Live/Production".
Also just so you know if your callback page is being accessed by WorldPay you could insert code to the top of your callback page which will send you an email when it's being accessed with the post values (see below).
// Define your debug email address
$RBSPostEmail = ''; // e.g $RBSPostEmail = 'youremail@yourdomain.com';
$RBSDebugActive = false; //Change to false to disable debug emails.
// Build Email
$message = "RBS WorldPay Post Values\n".'\n';
foreach($_POST as $name => $value) {
$message .= "$name : $value
";
}
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
if($RBSDebugActive){
// Send Email
mail($RBSPostEmail, 'RBS WorldPay Post Values', $message);
}
Good Luck!
If it still don't work, hit it again!
#4
Posted 09 June 2011, 19:38
peterbuzzin, on 09 June 2011, 14:28, said:
Ello,
Couple of points.
1: WorldPay Hosted and WorldPay Junior are the same thing (That's marketing for you) .
Since the release of the OSC 2.3 WorldPay has changed their payment URLs so the URL's contained in the default WorldPay Modules will need updating. (The official response was "The old URL's may or may not work all the time")
From https://select.wp3.rbsworldpay.com/wcc/purchase
To https://secure.wp3.rbsworldpay.com/wcc/purchase
2: OSC 2.3 ext/modules/payment/hosted_callback.php still contains deprecated code. Depending on your server it could fail on the very first line of code (line 13)
if (isset($HTTP_POST_VARS['M_sid']) && !empty($HTTP_POST_VARS['M_sid'])) {
There are compatibility functions within OSC that will check if $HTTP_POST_VARS is valid/supported and if not change them to the new standard $_POST, however the line of code that does this is executed AFTER if (isset($HTTP_POST_VARS['M_sid']) && !empty($HTTP_POST_VARS['M_sid'])) {
So line 13 (or 1 depending on your perspective) checks to see if M_sid value is set and not empty, if it's set and exists it moves on and on line 15 (or 3) includes application_top.php which will then start the compatibility code conversions. That's not going to help if you continuously fail at line 13 (or 1).
So change the above to $_POST.
Make sure you have set up different order status for prepairing and successful WorldPay transactions.
Check the field (in html source code) of checkout_confirmation.php to make sure the field MC_callback contains a valid return link.
Make sure your "Production/Live" configuration in your WorldPay configuration is set up correctly. If your test environment works then just copy the settings from your "Text/Development" WorldPay configuration settings (at the bottom of the page in your WorldPay control panel) to the "Live/Production".
Also just so you know if your callback page is being accessed by WorldPay you could insert code to the top of your callback page which will send you an email when it's being accessed with the post values (see below).
Good Luck!
Couple of points.
1: WorldPay Hosted and WorldPay Junior are the same thing (That's marketing for you) .
Since the release of the OSC 2.3 WorldPay has changed their payment URLs so the URL's contained in the default WorldPay Modules will need updating. (The official response was "The old URL's may or may not work all the time")
From https://select.wp3.rbsworldpay.com/wcc/purchase
To https://secure.wp3.rbsworldpay.com/wcc/purchase
2: OSC 2.3 ext/modules/payment/hosted_callback.php still contains deprecated code. Depending on your server it could fail on the very first line of code (line 13)
if (isset($HTTP_POST_VARS['M_sid']) && !empty($HTTP_POST_VARS['M_sid'])) {
There are compatibility functions within OSC that will check if $HTTP_POST_VARS is valid/supported and if not change them to the new standard $_POST, however the line of code that does this is executed AFTER if (isset($HTTP_POST_VARS['M_sid']) && !empty($HTTP_POST_VARS['M_sid'])) {
if (isset($HTTP_POST_VARS['M_sid']) && !empty($HTTP_POST_VARS['M_sid'])) {
chdir('../../../../');
require ('includes/application_top.php');
So line 13 (or 1 depending on your perspective) checks to see if M_sid value is set and not empty, if it's set and exists it moves on and on line 15 (or 3) includes application_top.php which will then start the compatibility code conversions. That's not going to help if you continuously fail at line 13 (or 1).
So change the above to $_POST.
Make sure you have set up different order status for prepairing and successful WorldPay transactions.
Check the field (in html source code) of checkout_confirmation.php to make sure the field MC_callback contains a valid return link.
Make sure your "Production/Live" configuration in your WorldPay configuration is set up correctly. If your test environment works then just copy the settings from your "Text/Development" WorldPay configuration settings (at the bottom of the page in your WorldPay control panel) to the "Live/Production".
Also just so you know if your callback page is being accessed by WorldPay you could insert code to the top of your callback page which will send you an email when it's being accessed with the post values (see below).
// Define your debug email address
$RBSPostEmail = ''; // e.g $RBSPostEmail = 'youremail@yourdomain.com';
$RBSDebugActive = false; //Change to false to disable debug emails.
// Build Email
$message = "RBS WorldPay Post Values\n".'\n';
foreach($_POST as $name => $value) {
$message .= "$name : $value
";
}
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
if($RBSDebugActive){
// Send Email
mail($RBSPostEmail, 'RBS WorldPay Post Values', $message);
}
Good Luck!
Thanks for your help. In the end, I found that all I needed to do was change the callback URL within the worldpay account from http://<WPDISPLAY ITEM=MC_callback> to <WPDISPLAY ITEM=MC_callback>














