Page 1 of 1

PayPal Express + OpenCart 1.5.6.4 + IE + Bad Gateway

Posted: Wed Mar 23, 2016 10:10 pm
by ibizavenue
The file catalog/controller/payment/pp_express.php contains the following code starting on line 1317:

Code: Select all

		if ($this->config->get('pp_express_test') == 1) {
			header('Location: https://www.sandbox.paypal.com/cgi‑bin/webscr?cmd=_express-checkout&token=' . $result['TOKEN'].'&useraction=commit');
		} else {
			header('Location: https://www.paypal.com/cgi‑bin/webscr?cmd=_express-checkout&token=' . $result['TOKEN'].'&useraction=commit');
		}
Note the invalid characters in the URL. The URL should be

Code: Select all

		if ($this->config->get('pp_express_test') == 1) {
			header('Location: https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=' . $result['TOKEN'].'&useraction=commit');
		} else {
			header('Location: https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=' . $result['TOKEN'].'&useraction=commit');
		}
On my OpenCart store, this problem hasn't caused an issue (with IE) until recently. (I assume it is because Microsoft released a patch for Internet Explorer that handles the URL differently, which causes an issue with PayPal.)

In Internet Explorer 11, when a user clicks on the Pay with credit or Visa Debit card button on the PayPal page, PayPal displays:

502 Bad Gateway
--------------------------------------------------------------------------------
nginx/1.6.0


The issue does not show up for Google Chrome nor for Firefox.

Changing the code as mentioned above resolves the issue for Internet Explorer.

Re: PayPal Express + OpenCart 1.5.6.4 + IE + Bad Gateway

Posted: Wed Mar 23, 2016 10:38 pm
by Qphoria
That code is not in any core file I that I can see. Perhaps it was something with the way you uploaded the file?

Re: PayPal Express + OpenCart 1.5.6.4 + IE + Bad Gateway

Posted: Thu Mar 24, 2016 3:25 am
by ibizavenue
Qphoria, thanks for replying.

I downloaded OpenCart 1.5.6.4 again from http://www.opencart.com/index.php?route ... d/download and extracted catalog/controller/payment/pp_express.php.

The file size for pp_express.php after extraction is 82,317 bytes which matches the file size in the ZIP archive.

I opened pp_express.php using 3 different editors including Notepad++ and all 3 editors show the same problem code (lines 1318 and 1320).

(I'm not sure that by searching you will find the code. As they seem to be non-printable chars.)
pp_express.jpg

pp_express.jpg (56.42 KiB) Viewed 22820 times


Re: PayPal Express + OpenCart 1.5.6.4 + IE + Bad Gateway

Posted: Thu Mar 24, 2016 10:11 pm
by Qphoria
Sorry I didn't look at the obvious version in the title :P
I was checking 2.x
Yes it looks like there was some garbage in the url in 1.5.6.4

Re: PayPal Express + OpenCart 1.5.6.4 + IE + Bad Gateway

Posted: Tue Sep 27, 2016 2:44 am
by IP_CAM
yes, it's corrupted, in the default 1.5.6.4, up to today ! It has been fixed, in OC v.1.5.6_rc,
but unfortunately, this well-done RC-Release has been KILLED, with all it's fixes made, in favour of OC-2, I assume... :-\

Code: Select all

www.sandbox.paypal.com/cgi‑bin/webscr?
Ernie

http://www.openshop.li/downloads/openca ... 6.5_rc.zip