Jump to content

[Resolved] Order status reverts to processing


fldavidallsop

Recommended Posts

I have a v5 running the latest version and the order statuses are reverting back to processing shortly after marking as complete.

I can see the revert in the order status history.

Can anyone help with this?

Thinking maybe it is a PayPal issue?

I am seeing this PHP error:

06-Nov-2015 12:14:44 UTC] PHP Warning: Invalid Security Token in /home/t7nw3vb9/public_html/classes/sanitize.class.php on line 120
[06-Nov-2015 13:30:44 UTC] PHP Warning: implode() [<a href='http://docs.php.net/manual/en/function.implode.php'>function.implode.php</a>]: Invalid arguments passed in /home/t7nw3vb9/public_html/classes/order.class.php on line 494
[06-Nov-2015 19:21:25 UTC] PHP Warning: implode() [<a href='http://docs.php.net/manual/en/function.implode.php'>function.implode.php</a>]: Invalid arguments passed in /home/t7nw3vb9/public_html/classes/order.class.php on line 494
[06-Nov-2015 19:47:50 UTC] PHP Warning: implode() [<a href='http://docs.php.net/manual/en/function.implode.php'>function.implode.php</a>]: Invalid arguments passed in /home/t7nw3vb9/public_html/classes/order.class.php on line 494

Link to comment
Share on other sites

Code that can change an order's status is not restricted to being able to change from any given status. That is, from any arbitrary status, the order can be changed to any other arbitrary status. So, it is possible (but not so probable) that PayPal could move the order to Processing after the admin moved it to Complete.

For that to happen, the Admin would move the order to Complete almost immediately after the order was received but before the transaction processor called CubeCart with the results of the transaction. When the processor calls CubeCart, the relevant gateway module has the order moved to Processing.

So, for the suspect order, on the History tab, note each time the order's status was changed. Look at the order's Transaction Log and note the times that the gateway logged. Then, in admin, Staff Access Log, Admin Activity tab, find those times and note what the admin was doing.

Putting all these notes together in chronological order should reveal who did what when and in what order.

Link to comment
Share on other sites

The PHP Warnings relate to an item's chosen options when purchased. When there is a need to get an order's details (it's 'summary'), for each item in the order, the item's options are discerned.

The warning is saying that something is wrong with how the item's options are being presented to a function. This statement being reported in the Warning notice, and the surrounding statements, are no different than CC608. So I am hesitant to blame the code.

If you wish, take careful note of what order you call up to view the summary and when. If the Warning appears, then one of the items in that order has a list of that purchased item's options stored in a faulty manner. Then we go looking for what that faulty manner looks like.

 

Link to comment
Share on other sites

I am thinking that this is a  PayPal issue and maybe something has changed on the PayPal account, all previous orders to when this starting occurring had 2 transaction lines and the new ones have multiple lines.

Although the original order transaction log seems strange anyway as it is determining that the transaction ID has been used before.

What do you think? I am going to check if anything has changed on the PayPal account. Just a note that this is the standard PayPal gateway.

Transaction Log Before

Order_Before.thumb.PNG.ba983504e1a506eae

Transaction Log Now

Order_After.thumb.PNG.a7ba75dc1a1891e9e1

Link to comment
Share on other sites

The time difference doubles after each attempt:

<1min, 1m, 2m, 3m, 6m, 10m, 20m, 40, 90m, 3hr, 6hr, 12hr, 24hr (give or take a few minutes).

So, it's something PayPal may be doing (I wouldn't know), but it seems either:

* CubeCart is not returning a 200 OK response when PayPal is sending the IPN

* PayPal is ignoring the 200 OK

So, yes, PayPal's IPN would trigger CubeCart to move the order to Processing.

(I think, maybe, the PayPal gateway module should check first if the order was already at Processing or Completed?)

Link to comment
Share on other sites

Disabling the whole of mod_security is not a very good idea at all - you should have simply whitelisted the specific rule that PayPal was tripping when making the post  alternatively what we do across all of our servers is whitelist the PayPal IPN server IP addresses in the firewall.  You might also want to enquire what ruleset is being used for mod_security

Ian

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...