Post by ian_jia » Tue Jul 03, 2018 4:12 pm

Server: Debian
Version: Opencart 3.0.2

I have done chmod 755 for all dir and 644 for all files some days ago.
Then, I test the purchase with paypal express checkout, it returned HTTP ERROR 500 after I input the paypal username/passwd to complete the payment.
1. The payment is live not in sandbox.
2. The payment is completed, the money has been received.
3. The order alert email was also received.

But there are two error as below:
1. After i finished the payment and redirect to the store it shows "HTTP ERROR 500" in this page:
https://www.****.com/index.php?route=extension/payment/pp_express/checkoutReturn&token=EC-9WT90270K4377****&PayerID=VSZY6YMEA****
(**** I hide for safe)
2. The order doesn't show in Admin > Sales > Orders

Please help me.
Many thanks!
IAN

Newbie

Posts

Joined
Sun Apr 01, 2018 11:53 am

Post by straightlight » Tue Jul 03, 2018 7:38 pm

2. The order doesn't show in Admin > Sales > Orders
What about the error logs / server access logs regarding the error 500?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ian_jia » Tue Jul 03, 2018 8:37 pm

Hello straightlight,
there is No Error Log for opencart, I think the file permission cause this problem.
And if I refresh the error page it redirect normal page display:
"There was an error
11607 : A successful transaction has already been completed for this token."
straightlight wrote:
Tue Jul 03, 2018 7:38 pm
What about the error logs / server access logs regarding the error 500?

Newbie

Posts

Joined
Sun Apr 01, 2018 11:53 am

Post by straightlight » Wed Jul 04, 2018 8:43 pm

See this post regarding the same status message: viewtopic.php?t=167765#p638299 . Is it the case for you as well?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Wed Jul 04, 2018 8:53 pm

One way to verify that statement since the PayPal token may not always return accurately unfortunately would be by verifying the installed fraud modules when a token can be verified at that point. In catalog/controller/extension/payment/pp_express.php file, in the checkoutReturn() method,

find:

Code: Select all

$result = $this->model_extension_payment_pp_express->call($data);
add below:

Code: Select all

// Anti-Fraud
		$this->load->model('setting/extension');

		$extensions = $this->model_setting_extension->getExtensions('fraud');
		
		$frauds_check = array();

		foreach ($extensions as $extension) {
			if ($this->config->get('fraud_' . $extension['code'] . '_status')) {
				$this->load->model('extension/fraud/' . $extension['code']);

				if (property_exists($this->{'model_extension_fraud_' . $extension['code']}, 'check')) {
					$frauds_check[] = true;
				}
			}
		}
		
		if ($frauds_check && !empty($result['TOKEN'])) {
			$this->log->write('PayPal Express Checkout - DEBUG - checkoutReturn() method - A single or multiple fraud extension modules have been installed. This could cause the PayPal Express Checkout token not to be re-validated!');
		}
Test a transaction again with PayPal Express Checkout. Then, from your OC admin error logs page, see the most recent line beginning with: PayPal Express Checkout - DEBUG - checkoutReturn() method - if it appeared.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ian_jia » Thu Jul 05, 2018 10:08 am

Hi, Straightlight,

I have added your code to pp_express.php, but there is no log coming out. it's empty.
I checked the database, all the missing order status is 0 , and can't update from admin >order, the page will show "internal server error" when I try to change the "Order Status"

Recently I re-install the "AJAX Quick Checkout Pro" module. Will it cause the problem?
Last edited by ian_jia on Thu Jul 05, 2018 10:18 am, edited 1 time in total.

Newbie

Posts

Joined
Sun Apr 01, 2018 11:53 am

Post by straightlight » Thu Jul 05, 2018 10:17 am

Since the error 500 message shows from the admin but not from the store-front end as this was not clarified on your first post, the codes above will not provide the results from the admin. Revert the changes and check your server access logs regarding the most recent error 500 event from the OC admin folder.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ian_jia » Thu Jul 05, 2018 10:40 am

straightlight wrote:
Thu Jul 05, 2018 10:17 am
Since the error 500 message shows from the admin but not from the store-front end as this was not clarified on your first post, the codes above will not provide the results from the admin. Revert the changes and check your server access logs regarding the most recent error 500 event from the OC admin folder.
The admin error displayed when I change the order status, but if I change the order_status_id from 0 to 2 in database, and update the order from admin again, there will be no Error. The only problem is all the new order status is set to 0.....

and below is the apache log with 500 error code.

Apache log:
[04/Jul/2018:16:58:52 +0000] "POST /register.html HTTP/1.1" 500 -
[05/Jul/2018:02:02:40 +0000] "GET /index.php?route=extension/payment/pp_express/checkoutReturn&token=EC-0GG26103RP15*****&PayerID=VSZY6YME***** HTTP/1.1" 500 -
[05/Jul/2018:02:07:29 +0000] "POST /index.php?route=api/order/history&api_token=226cb1c211721655b36be*****&store_id=0&order_id=211 HTTP/1.1" 500 -
[05/Jul/2018:02:27:30 +0000] "POST /index.php?route=extension/payment/pp_standard/callback HTTP/1.1" 500 -

Newbie

Posts

Joined
Sun Apr 01, 2018 11:53 am

Post by straightlight » Thu Jul 05, 2018 6:46 pm

The most recent error was with PayPal Standard and not only with PayPal Express Checkout:
[05/Jul/2018:02:27:30 +0000] "POST /index.php?route=extension/payment/pp_standard/callback HTTP/1.1" 500 -
So far, it is not a persistent issue known with OC. Enable the debug mode on each module and test the transactions. Then, see each logs relatively.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Thu Jul 05, 2018 7:01 pm

A solution has also been posted here: viewtopic.php?f=202&t=205453#p728291 . See if that solves the issue.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Thu Jul 05, 2018 7:39 pm

Also ensure to have configured your order processing and complete statuses from your admin - > systems - > settings - > edit settings page and from your admin payments module page so that both order statuses matches.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by poche1988 » Tue Jul 24, 2018 11:03 am

Have you solved the problem?
After I installed Paypal express I tried to buy a test product ($0.10). I'm receiving the money on my paypal account but I'm getting a 500 - internal server error when paypal redirect to sporteditions.com/index.php?route=payment/pp_express/checkoutReturn&token=xxxxxxxxxxxxxx&PayerID=xxxxxxxxxxxxxx/.

Newbie

Posts

Joined
Tue Jul 24, 2018 9:41 am
Who is online

Users browsing this forum: No registered users and 11 guests