Post by Kenberne1965 » Mon Jul 13, 2015 8:57 pm

I have 2 websites, which are live and sage pay payments are failing, Ive also tried a clean install of OC with the only change being made, entering the sage pay credentials and this gives the same error, Sagepay say its to do with how opencart is not responding correctly to their POST BACK.

When I view the transaction in either the Test Server or Live server, this is the error
Transaction completed but Vendor systems returned INVALID or ERROR in response to notification POST. Transaction CANCELLED by the Vendor.
When A customer should be redirected back to opencart, it lands on checkout/checkout with a message saying there was an error with your request at the top.

No error is logged within Opencart logs, & because I've been able to replicate this on a brand new install, im logging it here as a potential bug.

test website is http://www.builtin-cookers.co.uk with Sage pay set to Test Server.
This is just the opencart 2 demo website

It`s really urgent I get this sorted out ASAP, Ive never had problems with any opencart 1 site with Sage pay.

Kind Regards
Paul
Last edited by Kenberne1965 on Thu Jul 16, 2015 4:44 am, edited 1 time in total.

Freelance Opencart 1.5.x and 2.x Developer - Available For Hire
Latest Opencart 2 Project --> http://www.falcon-rangecookers.co.uk


User avatar
Active Member

Posts

Joined
Wed Apr 22, 2015 9:37 pm
Location - Doncaster, UK

Post by Kenberne1965 » Thu Jul 16, 2015 1:54 am

Ive narrowed this down to an MD5 Hashing problem, so what Sage pay are sending back does not match what we have in the opencart ordering system.. Now to find out what exactly doesn't match.

Don't worry fella`s ill do my own support... ;D

Freelance Opencart 1.5.x and 2.x Developer - Available For Hire
Latest Opencart 2 Project --> http://www.falcon-rangecookers.co.uk


User avatar
Active Member

Posts

Joined
Wed Apr 22, 2015 9:37 pm
Location - Doncaster, UK

Post by Kenberne1965 » Thu Jul 16, 2015 4:44 am

after studying the code and sage pays protocol docs,i spotted a rather important notice,which states that the vendor name must be in lowercase, mine wasn't of course and so this was where the MD5 Hash was different.

so 2 ways to fix this, either make sure the Vendor name is entered into the admin section all in lowercase or make sure the vendor name is converted to lowercase in the sagepay_server.php controller file either directly or via VQMod.

Code: Select all

$vendorToLower = strtolower($this->config->get('sagepay_server_vendor'));

Code: Select all

$str_message = $str_vps_tx_id . $vendor_tx_code . $str_status . $str_tx_auth_no . $vendorToLower . urldecode($str_avs_cv2) . $str_security_key. $str_address_result . $str_postcode_result . $str_cv2_result . $str_gift_aid . $str_3d_secure_status . $str_cavv. $str_address_status . $str_payer_status . $str_card_type . $str_last_4_digits . $str_decline_code . $str_expiry_date . $str_bank_auth_code;
im posting this because im sure somebody else will trip over this like i did, until it is officially fixed.

Paul.

Freelance Opencart 1.5.x and 2.x Developer - Available For Hire
Latest Opencart 2 Project --> http://www.falcon-rangecookers.co.uk


User avatar
Active Member

Posts

Joined
Wed Apr 22, 2015 9:37 pm
Location - Doncaster, UK
Who is online

Users browsing this forum: No registered users and 5 guests