Post by Khal » Sun Nov 25, 2018 6:31 pm

I have just noticed that some of my orders have started to update to Pending when they have been successfully placed, and when I try to change the order status through the Order>History tab, they stay as Pending status, regardless of the status change.

This does not happen to all of my orders, but I cannot figure out why it affects some orders and not others. I have checked the Payment module statuses, they are correctly set. This occurs on orders received through all payment methods, from all destinations, but occasionally an order will have the correct "Complete" status. I do not recall making any changes to the site when this started to happen.

I would greatly appreciate your help on trying to resolve this matter.

OC 2.0.1.1

Thank you

Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by johnp » Sun Nov 25, 2018 7:11 pm

Do you have anything showing in your error logs? If you enable the Paypal debug mode in your payment module you'll see what Paypal sent back. It might offer some useful info.

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by Khal » Sun Nov 25, 2018 7:43 pm

Thank you for the reply.
No I don't have any payment-related errors in my error log, although I have some other module related errors but these were not generated at the time of the orders.
I enabled the Paypal debug mode as suggested and made a test order. I got the following message in the error log:

Code: Select all

P_STANDARD :: IPN REQUEST: cmd=_notify-validate&mc_gross=3.30&invoice=3528+-+.....&protection_eligibility=Eligible&address_status=confirmed&item_number1=PINWHEEL&item_number2=&payer_id=TF85FCV43TRG8&address_street=......+PST&payment_status=Completed&charset=UTF-8&address_zip=.....&mc_shipping=0.00&first_name=........=AIJFP3q-b66p9PozwPM.4doVOBXaA81EehfePmA9CCM1hy7ZogU119iJ&payer_email=.....txn_id=1UE935905G3161037&payment_type=instant&payer_business_name=.....&address_state=&item_name1=Hijab+Pin+Wheel+Black+%26amp%3B+White&receiver_email=.....&item_name2=Shipping%2C+Handling%2C+Discounts+%26+Taxes&payment_fee=&shipping_discount=0.00&quantity1=1&insurance_amount=0.00&quantity2=1&receiver_id=DTKPEMWQLFTXW&txn_type=cart&discount=0.00&mc_gross_1=2.00&mc_currency=GBP&mc_gross_2=1.30&residence_country=GB&shipping_method=Default&transaction_subject=&payment_gross=&ipn_track_id=3657fe1d62496

2018-11-25 11:48:11 - PP_STANDARD :: IPN RESPONSE: VERIFIED
I have blanked out the personal information. This order is showing the Pending status. Is there anything here that seems strange?

Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by johnp » Sun Nov 25, 2018 8:58 pm

That looks to me like a successful transaction return. Have you got IPN set up on Paypal or is it disabled and you're just using the Opencart built in one? I'm guessing you've got the transaction method as "Sale" in the Paypal module and not "Authorization". Does your site have SSL?

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by Khal » Mon Nov 26, 2018 12:54 am

I'm using the built-in Paypal standard module with the transaction method set to "Sale". Yes I have SSL.

This issue happens when I receive orders using both of the payment modules that I have set up- Paypal and Stripe pay. Both have been working fine with the settings I have on them, until very recently.

Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by Khal » Mon Nov 26, 2018 1:59 am

I have been looking through the forums on this issue and someone suggested that they resolved it by the web hosting company resetting cURL libraries, and deleting the php.ini file in domain root directory as it was conflicting. Could this be the cause of the problem?

Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by straightlight » Mon Nov 26, 2018 4:03 am

Khal wrote:
Mon Nov 26, 2018 1:59 am
I have been looking through the forums on this issue and someone suggested that they resolved it by the web hosting company resetting cURL libraries, and deleting the php.ini file in domain root directory as it was conflicting. Could this be the cause of the problem?
Topic unprovided.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

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

Post by Khal » Mon Nov 26, 2018 4:55 am

straightlight wrote:
Mon Nov 26, 2018 4:03 am
Khal wrote:
Mon Nov 26, 2018 1:59 am
I have been looking through the forums on this issue and someone suggested that they resolved it by the web hosting company resetting cURL libraries, and deleting the php.ini file in domain root directory as it was conflicting. Could this be the cause of the problem?
Topic unprovided.
The thread is here: viewtopic.php?t=127980

The post I am refering to is given at the bottom of the thread:
I don't know if your issue is the same as the one I recently had. But I was getting paypal IPN telling me the order was marked as complete, but opencart telling me that the orders were pending, or missing.

It turned out, my web hosting company had to reset cURL libraries. And I had to delete my php.ini file in my domain root directory as it was conflicting.

Try that and see what happens.

Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by ADD Creative » Mon Nov 26, 2018 6:10 am

Any of the orders use coupons? Could be this issue of your Fraud Status was set to Pending. https://github.com/opencart/opencart/issues/3657

Are any of the Anti-Fraud extensions enabled?

Ever seen PP_STANDARD :: RECEIVER EMAIL MISMATCH! or PP_STANDARD :: TOTAL PAID MISMATCH! in your error logs?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Khal » Mon Nov 26, 2018 6:07 pm

ADD Creative wrote:
Mon Nov 26, 2018 6:10 am
Any of the orders use coupons? Could be this issue of your Fraud Status was set to Pending. https://github.com/opencart/opencart/issues/3657

Are any of the Anti-Fraud extensions enabled?

Ever seen PP_STANDARD :: RECEIVER EMAIL MISMATCH! or PP_STANDARD :: TOTAL PAID MISMATCH! in your error logs?
No I already saw the thread about the coupon code causing a similar issue. None of these orders use a coupon code and I don't have an any-fraud extensions enabled as far as I know. I have never had any issues with coupon codes and errors on my site.

I occasionally see the PP_STANDARD :: TOTAL PAID MISMATCH! in my error logs when someone pays in a different currency and the order totals do not match. That order is listed as Pending, but I am able to change its status in the Order>History tab.

My Hosting company got back to me and they were unable to resolve it from the server side. They said: "I also recreated the issue and I tested it with different permissions, PHP versions and even tested multiple suggestions over the network but without a success. There is no any error on the application error. I can see only that you have reached entry processes (number of simultaneously running php and cgi scripts, as well as cron jobs and shell sessions) limit 3 times but I do not believe that this is the reason for the current issue."

Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by ADD Creative » Mon Nov 26, 2018 8:47 pm

When you try to change an order status in the Order>History tab and it doesn't change. What exactly happens? Do you see any error messages? Anything in the error logs? Do you see any messages in your web browser's development console (usually F12)?

Do you see a POST to index.php?route=api/order/history in the the network tab of the browser inspect tool? Is the status code 200? What is in the response?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Khal » Mon Nov 26, 2018 9:18 pm

ADD Creative wrote:
Mon Nov 26, 2018 8:47 pm
When you try to change an order status in the Order>History tab and it doesn't change. What exactly happens? Do you see any error messages? Anything in the error logs? Do you see any messages in your web browser's development console (usually F12)?

Do you see a POST to index.php?route=api/order/history in the the network tab of the browser inspect tool? Is the status code 200? What is in the response?
No there are no messages in the error log when I try to change the order status. Nothing happens but when I re-open the Order page, the status has changed to Pending. An email is sent to the customer with the Order Update notification.

I get this message in the web browser console:
less-1.7.4.min.js:13 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
The two posts displayed are:

Code: Select all

....admin/index.php?route=extension/openbay/addorderinfo&token=5531fe8944d9e7841980bde0d5a4a8df&order_id=3528&status_id=1
and

Code: Select all

....admin/index.php?route=sale/order/api&token=5531fe8944d9e7841980bde0d5a4a8df&api=api/order/history&order_id=3528
Both have the status code 200. Ive attached a screenshot.

The OpenBay extension is disabled on my site so I don't know why that is showing.

Attachments

Capture.PNG

Capture.PNG (22.2 KiB) Viewed 3798 times


Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by ADD Creative » Mon Nov 26, 2018 11:50 pm

Is the order status in the email sent to customers correct?

If you click on the following and then click Response in the side panel, what is the response?

Code: Select all

....admin/index.php?route=sale/order/api&token=55...df&api=api/order/history&order_id=3528

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Khal » Tue Nov 27, 2018 12:24 am

No, the order status sent to the customer states the order is Pending.

The response states:

"{\"success\":\"You order has been successfully modified orders\"}"

Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by ADD Creative » Tue Nov 27, 2018 3:16 am

I should of asked for the value of order_status_id in the Form Data section at the bottom of the Headers tab in the same side panel.

It shouldn't be 1 (assuming your pending is status 1).

Are the orders from guest customers or customers who no not have safe set the Yes in their settings?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Khal » Tue Nov 27, 2018 3:36 am

ADD Creative wrote:
Tue Nov 27, 2018 3:16 am
I should of asked for the value of order_status_id in the Form Data section at the bottom of the Headers tab in the same side panel.

It shouldn't be 1 (assuming your pending is status 1).

Are the orders from guest customers or customers who no not have safe set the Yes in their settings?
The orders that are showing this issue come from both guest customers and also existing customers, as well as from new customers that create an account. I can't seem to find a common link between the few orders that are processed correctly.

The order_status_id when I try to add a different status, such as "dispatched" is 3:

Code: Select all

order_status_id: 3
notify: 1
append: 0
comment: 
Yes the "pending" order_status_id is 1.

Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by ADD Creative » Tue Nov 27, 2018 7:35 pm

All looks correct and points to an issue with the code at the link below.
https://github.com/opencart/opencart/bl ... #L261-L308

Interestingly there are two points in that code that will change the order status from the one you ask for. If you have no modifications or extension that modify that part of the code and your Fraud Order Status is not set to Pending in the settings, but the default Order Status is. I would, as an experiment, temporarily comment out the line at the link below.

https://github.com/opencart/opencart/bl ... r.php#L304

So it becomes.

Code: Select all

//$order_status_id = $this->config->get('config_order_status_id');
You may need to refresh your modification cache after doing this.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Khal » Tue Nov 27, 2018 9:36 pm

My Fraud Setting is set to "canceled" and the MaxMind Fraud system is not enabled.

It is really frustrating because I have not made any changes or added an new extensions so I don't know why this has started to happen.

I do have Sucuri protection and firewall on my website and they recently changed the IP address of my DNS. This caused some cache issues on the website, which have now been resolved. Could this be related to that, as I noticed this order status issue at around the same time?

Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK

Post by ADD Creative » Tue Nov 27, 2018 10:49 pm

It could be if they route traffic through a single IP address and the address got into the banned list.

Did you try, as an experiment, temporarily commenting out the line at the link below?

https://github.com/opencart/opencart/bl ... r.php#L304

So it becomes.

Code: Select all

//$order_status_id = $this->config->get('config_order_status_id');
You may need to refresh your modification cache after doing this.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Khal » Tue Nov 27, 2018 11:21 pm

Hi
Yes I have commented out that line you suggested in the code, and the order status seems to be working correctly now... so can I leave that line commented out?
What effect will it have on the the ordering system?

I am also waiting to hear back from sucuri to see if it's something on their end.

Thank you for your time and help on trying to resolve this issue for me, I appreciate it

Active Member

Posts

Joined
Thu May 24, 2012 9:24 pm
Location - Teesside, UK
Who is online

Users browsing this forum: No registered users and 187 guests