Jump to content

Order's pending... how to change to processing


djcaseanova

Recommended Posts

So I get an order, and it's stated as Pending. The only way I am aware of an order is because Paypal sends me a payment notification. I then check and the orders are pending, even though they've been paid. Once I change the order status to processing, I then get an email saying an order has been placed in the store.

 

Is there a way to make all orders placed go to "processing" instead of pending?? Doesn't this also effect stock levels if an order is just pending vs. processing??? I can't have multiple orders for the same products that may be low on stock and have overlaps.

 

Thanks!

 

 

EDIT: Figured out the email setting for pending over processing, but still looking for automatically going to processing instead.

Link to comment
Share on other sites

In my experience, this happens when an IPN url is given to a payment processor, and the payment processor doesn't 'decode' it. Rather, the payment processor uses it verbatim -- which, unfortunately, is not agreeable to CubeCart.

 

Let's assume you are using PayPal. In the file /modules/gateway/PayPal/gateway.class.php, line 80, find:

'notify_url'    => $GLOBALS['storeURL'].'/index.php?_g=rm&type=gateway&cmd=call&module=PayPal',

PayPal is sending this back exactly as you see it. What CubeCart does not like is the & sequence. CubeCart rejects the info provided in the querystring and thus does not know what payment module to use to finish updating the status of the order.

 

Try changing all three instances of that sequence to a single ampersand (in the file of the payment processor module you are using). Then see if orders are getting properly updated.

Link to comment
Share on other sites

  • 3 weeks later...

I am having a similar issue (with a 5.2.11 site)

When a customer sends their payment (Authorize.net gateway), sometimes the customer does not click the last button to return to site.

 

Then, when I see the payment come through, I manually change the order from pending to processing.  When I change the order from pending to processing, I do not get an confirmation e-mail, but they do.

Link to comment
Share on other sites

The customer will get an email when the order goes to Processing.
 
The admin may get an email if the Store Settings, Features tab, Order status for admin email notifications is set to Processing. This email will get sent to the store's main email address (Advanced tab, Sender's Name). A copy will also be sent to every Administrator (if email different than Sender's Name) if they have their profile's Receive order notifications? enabled.

 

The customer's email and the admin's email use different templates.

Link to comment
Share on other sites

Brian, I just noticed this post. Could this be the cause of intermittent pending orders instead of all orders? On our store, we get at least two/three orders a day that must be manually updated to processing after we receive notification of payment.

Link to comment
Share on other sites

"Sometimes the customer does not click the last button to return to site."

 

I think this should not actually matter. It is the responsibility of the payment processor to send a specially formatted POST to CubeCart when the outcome of the transaction is known: success or failure.

 

Let's assume the POST is formatted correctly (as possibly per post#2 above).

 

The problems that could happen is that your site, whether it is CubeCart or the whole server in general, simply does not accept the POST.

 

If your site does not accept the POST, or CubeCart fails to tell the webserver to respond with a 200 OK answer, then the payment processor should note this lack of response from your site. Your payment processor should notify you (or log the event somehow) that there have been irregularities when attempting to make the POST to your site.

 

Visit the Merchant Account control panel for your payment processor. Look for some sort of processing log.

Link to comment
Share on other sites

Could this be the cause of intermittent pending orders instead of all orders? On our store, we get at least two/three orders a day that must be manually updated to processing after we receive notification of payment.

What payment processor are you using and have you checked the error_log for any details around the time the orders are placed

The problems that could happen is that your site, whether it is CubeCart or the whole server in general, simply does not accept the POST.

 

If your site does not accept the POST, or CubeCart fails to tell the webserver to respond with a 200 OK answer, then the payment processor should note this lack of response from your site. Your payment processor should notify you (or log the event somehow) that there have been irregularities when attempting to make the POST to your site.

 

Visit the Merchant Account control panel for your payment processor. Look for some sort of processing log.

As Brian has said, also check your payment processor's control panel for the transaction log (ie for PayPal it is the IPN log) as this will usually record any issues. We have had problems with several clients where the order wasnt updating but nothing was recorded here though.

Let us know about both items requested above

Thanks

Ian

Link to comment
Share on other sites

I've checked multiple transactions that didn't show up in my Admin Control Panel as complete right away, and they all showed as complete through Paypal. They had an http response code of 200. Any other ideas? Should I try moving from the payment gateway to the plugin?

Link to comment
Share on other sites

One more check. This is based on post#2 above, which the server still issues a 200 OK response:

 

PHP Warning: Security Warning: Illegal array key "ABC" was detected and was removed.

 

Are there any of these entries in your PHP error log? (Not your web access log, although you would also find clues in the access logs as well.)

Link to comment
Share on other sites

Nothing like that, but I did see [10-Jun-2014 18:49:20 America/New_York] PHP Fatal error:  Undefined class constant 'FM_DL_ERROR_PAYMENT' in .../store/classes/filemanager.class.php on line 257


Nevermind, I didn't scroll up enough - [10-Jun-2014 12:14:58 UTC] PHP Warning:  Security Warning: Illegal array key "amp;product_id" was detected and was removed. in /.../store/classes/sanitize.class.php on line 88
Link to comment
Share on other sites

Neither error is what I am looking for. These errors would be in the log at date/times within a minute or two after the date/time that is part of the order number.

 

The CubeCart order number is YYMMDD-HHMMSS-RAND. So, for an order that didn't come out of Pending, find entries in the error log dated at around that time. (If you are on a shared server, it is questionable if you have access to the server access logs in their raw form.)

 

But you said, "intermittent pending orders." Can I conclude then that you have just one and one only payment gateway enabled? Such that all orders are, in fact, getting transacted exactly the same way, but some do not come out of Pending?

Link to comment
Share on other sites

At the time of the most recent pending order, I had this error "[10-Jun-2014 16:02:39 America/New_York] PHP Notice:  cURL Error (22): The requested URL returned error: 503 Service Unavailable in .../store/classes/request.class.php on line 255"

 

I only have one payment gateway enabled. I'd say 1 order in 10 gives me issues.

Link to comment
Share on other sites

I'm curious to know: at the same place where there is a report of 200 OK responses to the IPN request made to your store, is there a following notation that indicates whether or not the store made the "notify-validate" part of the process?

 

In the PayPal gateway file, gateway.class.php (I'm looking at CC5210), line 90 starts the call function, initiated by analyzing the IPN URL part, cmd=call.

 

In this function, CubeCart is validating the notification received from PayPal - and uses cURL to do it.

 

So, either your hosting provider is randomly experiencing difficulties with PHP making the cURL connection, or PayPal is randomly going offline, or something is happening between these two endpoints.

 

In any case, $data will not match the cases in the switch statement. Unfortunately, this function isn't coded well enough to catch/notice this situation, nor do anything about it.

Link to comment
Share on other sites

  • 6 months later...

In my experience, this happens when an IPN url is given to a payment processor, and the payment processor doesn't 'decode' it. Rather, the payment processor uses it verbatim -- which, unfortunately, is not agreeable to CubeCart.

 

Let's assume you are using PayPal. In the file /modules/gateway/PayPal/gateway.class.php, line 80, find:

'notify_url'    => $GLOBALS['storeURL'].'/index.php?_g=rm&type=gateway&cmd=call&module=PayPal',

PayPal is sending this back exactly as you see it. What CubeCart does not like is the & sequence. CubeCart rejects the info provided in the querystring and thus does not know what payment module to use to finish updating the status of the order.

 

Try changing all three instances of that sequence to a single ampersand (in the file of the payment processor module you are using). Then see if orders are getting properly updated.

 

Hey bsmither,

 

For some reason, this is no longer working. I thought it was wiped out at the last update so I made the changes again and everything coming back is still going straight to pending instead of processing. Anything else I can try? The issue is that when stock levels get low the pending isn't adjusting the product stock until I manually change it to processing. This is a problem when there are multiple orders for an item overlapping the stock levels and customers have already paid. Just happened again lastnight. :(

 

If this won't work is there a way to adjust it so that a 'pending' order will remove those items from stock inventory?

Link to comment
Share on other sites

With regard to the problem of PayPal orders not getting set to Processing, we need to verify if PayPal is attempting to communicate with your store.

 

For that, we need to have the web server's access logs. You may be able to get these from your hosting provider's control panel for your site.

Link to comment
Share on other sites

We are also having problems with this pending/processing business - some orders appear pending, some appear processing - all for the same product and all processed via the Barclays Epdq gateway.

 

Also some customers whose orders show as 'processing' in the cubecart admin have not received emails with their download link (for downloadable products)

 

And of some of those who do receive such an email and download link, following the download link just goes to a blank page.

 

It's all a bit of an unhappy lottery at the moment!

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...