Hello,
There are several posts floatin around about problems with the Sage Pay UK Form module with all versions of Cre Loaded 6.4.1 CE/Pro/B2B.
This post attempts offers one solution to a particular problem and has a couple of other pointers too.
1. Sage Pay module to use
Download the latest
osCommerce Sage Pay Form module - you need the includes/modules/payment/sage_pay_form.php and the language file which goes to includes/languages/english/modules/payment/sage_pay_from.php.
2. Make the following mods (as per
post from aitsglobal here in particular the post dated July 16th 2010, if you use coupons.) You don't need to change anything in the osCommerce sage_pay_form.php module itself otherwise.
3. If you use the standard 3-page checkout (so all CE users ... this problem DOESN'T AFFECT One Page Checkout), the following will apply:
>> enctype="multipart/form-data"
This is part of Cre code for form submissions, including payment modules. Why I'm not sure as it's meant to be for <input> fields involving files. It breaks this Sagepay form so best avoided. The code change below removes this enctype ONLY from your sage_pay_form submission (so if you're using other payment modules they'll be unaffected.)
To fix:
templates/content (or templates/your template/content possibly) and find
checkout_confirmation.tpl.php around line 277 (in CE version)
Looks like this:
Code:
if (ACCOUNT_CONDITIONS_REQUIRED == 'false' ) {
echo tep_draw_form('checkout_confirmation', $form_action_url, 'post','enctype="multipart/form-data"');
} else {
echo tep_draw_form('checkout_confirmation', $form_action_url, 'post','onsubmit="return checkCheckBox(this)" enctype="multipart/form-data"');
}
Replace with this:
Code:
if ((ACCOUNT_CONDITIONS_REQUIRED == 'false' ) && ($_SESSION['payment'] == 'sage_pay_form')) {
echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');
} elseif ((ACCOUNT_CONDITIONS_REQUIRED == 'true' ) && ($_SESSION['payment'] == 'sage_pay_form')) {
echo tep_draw_form('checkout_confirmation', $form_action_url, 'post','onsubmit="return checkCheckBox(this)"');
} elseif (ACCOUNT_CONDITIONS_REQUIRED == 'false') {
echo tep_draw_form('checkout_confirmation', $form_action_url, 'post','enctype="multipart/form-data"');
} else {
echo tep_draw_form('checkout_confirmation', $form_action_url, 'post','onsubmit="return checkCheckBox(this)" enctype="multipart/form-data"');
}
4. Admin >> Modules >> Payment
If you want to try out the Sagepay system first, I'd recommend getting a Simulator account and testing a few orders. If you have 'Transaction Server = Simulator' set, make sure you have a
free Sagepay Simulator account setup because the Encryption Password is for the Simulator itself.
If you already have a Live account with Sagepay your encryption password should work. A Simulator password won't work with a Live account of course.
5. Setup your Sagepay account
It's worth checking all the settings from the Sagepay side of things too, including accepted currencies.
Hope this helps!
Simon