Just wanted to say thanks to Chris Stead and others who have contributed to this thread.
I have managed to get the Chris Stead Method to work with Sage Pay (Formerly Protx), VM 1.1.3 and Joomla 1.15.10, I've had to tweak a couple of things but thankfully nothing major as I have no PHP experience. I've been testing on a live system using a real credit card and a test product costing 0.01p. Here are my steps:
1) Use the Chris Stead Method as quoted in reply #22. When you set up the new payment method, before you can edit the configuration page you have to save and re-enter the payment method you've just created, you will then get a form to fill out in the configuration tab.
2) Fill out the configuration form as Chris suggests, I entered 2.2 in the VPS Protocol version field, live.sagepay.com in the hostname of the secure URL field and /gateway/service/vspform-register.vsp in the path of the secure URL field. Make sure you add your .com, .co.uk, .org to
http://www.yourdomain in the success and failure url.
3)The pathway to the english.php file seems to have changed since Chris created his method so I changed the code in checkout.protx_cpi_result.php file on line 35 from:
// load Mambo Language File
if (file_exists( $mosConfig_absolute_path. '/language/'.$mosConfig_lang.'.php' )){
require_once( $mosConfig_absolute_path. '/language/'.$mosConfig_lang.'.php' );
} else {
require_once( $mosConfig_absolute_path. '/language/english.php' );
}
to:
// load Mambo Language File
if (file_exists( $mosConfig_absolute_path. '/languages/'.$mosConfig_lang.'.php' )){
require_once( $mosConfig_absolute_path. '/languages/'.$mosConfig_lang.'.php' );
} else {
require_once( $mosConfig_absolute_path. '/administrator/components/com_virtuemart/languages/common/english.php' );
}
and changed the code on line 54 from:
} else {
require_once( ADMINPATH. 'languages/english.php' );
}
to:
} else {
require_once( ADMINPATH. 'languages/common/english.php' );
}
This gave me a blank page from my own website and the order in VM was left as pending and not confirmed, not great but better than the errors I was getting.
4) The next step sorts out the blank page and the order status. Take the code in reply #77 of this thread and paste it as instructed into the checkout.protx_cpi_result.php to stop the gaps in url returned from Sage Pay being filled with %20, the order status should change from pending to confirmed in VM's orders section with a successful transaction.
I still need to work on a Thank You message and a link to the order details page but the camel's back is broken. Thanks to all who contribute to these forums, a novice half wit like me wouldn't stand a chance without you.