Installation Error and Order Status not being updated to Complete

Posts: 4
Joined: 06/01/2008

Hello believe it or not I tried so many releases of Ubercart and have encountered a lot of problems along the way. The latest release, 5.x-1.0-rc5 gives me an installation error too:

user warning: Table 'drupal.uc_order_statuses' doesn't exist query: INSERT INTO uc_order_statuses (order_status_id, title, state, weight, locked) VALUES ('paypal_pending', 'PayPal pending', 'payment_received', 7, 1); in /home/.darnel/myusername/sitetest.domain.com/includes/database.mysql.inc on line 172.

I have installed Ubercart 5.x-1.0-rc5 twice (on a drupal fresh install) and encountered the same error after enabling the module.

After that error, however, I do not experience anything serious apart from the checkout problem which is already noted by users in some threads. I have tried configuring workflow but still I don't get any good results.

Everything in the Payment Settings have been properly configured because when I try to checkout using my sandbox account (buyer), I am redirected to the page that says "Your order is complete..."

However the serious problem is that the order status is not changed. It is still "Pending."
workflow should have checked if balance is 0 on invoke method "A payment gets entered for an order" and changed the status to "complete."
I've also the check the "uc_orders" table and the "order_status" is in_checkout and not complete.

By the way, I think this whole Ubercart project is a great open source option. I don't think it's particularly easy to come with something like this within a short time frame. It takes time and experience to come up with something like this so I'd really like to thank the team that built this project. I would probably use Drupal and Ubercart in some future projects and would hopefully get to help out if I can. However for now I am fairly new to Ubercart (but not Drupal because I've been using it for over 2 years now but I would like to help out a team working on an important e-commerce project.

I am currently testing out Ubercart again. Hopefully something will work differently on another fresh install.

Update:
The order status is now "pending" without any special configuration in workflow.
I also checked database tables, uc_payment_receipts is empty...
I also use ubercart userpoints, uc_uplog is also empty...

Any help would be appreciated.

Note: to confirm that this is a bug and not just me messing up, I did a test on http://livetest.ubercart.org/ which presumably runs on RC5.

Same problem I have seen: The order status is "pending" after a successful checkout.

http://i21.photobucket.com/albums/b296/sikatzonline/pending_ubercart_liv...

Posts: 2352
Joined: 08/07/2007
AdministratoreLiTe!

Is the order balance really 0? Payments are not necessarily processed at checkout, so the workflow event wouldn't ever happen. There's no good reason for that database error, but try doing another install, but don't enable the PayPal module until after the Order module is enabled. Drupal really should take care of that for you, but for some people it doesn't.

Posts: 12
Joined: 06/01/2008

The warning above is informing you that uc_order_statuses was never created as a table in your Drupal database. That's almost certainly going to be a problem. You'll want to make sure that it's properly created, or go back and create it yourself, if necessary.

That being said, I'm encountering a similar problem, in that a PayPal payment remains stuck at "Pending" as well. Additionally, the IPN log message informs me that it is "Receiving IPN at URL for order 0." The order balance is never reduced to $0, instead remaining the full balance.

In my case, I'm trying to allow anonymous users to pay via PayPal, after which they are given a new user account with a specific role.

Posts: 2352
Joined: 08/07/2007
AdministratoreLiTe!

castellan, I think the the order status table does get created, but it's just happening after the PayPal module is installed. The orders wouldn't have the status of Pending then.

Posts: 12
Joined: 06/01/2008

Ahh, good point... I'm generally very careful about installing new modules. I tend to prefer to install the base module and then turn on the extras slowly in order to eliminate errors like that and to make sure the site doesn't go crazy.

Posts: 4
Joined: 06/01/2008

Ok. I think what I did was I tried to enable everything at one time. Was in a hurry to do tests.

castellan, I'd like to verify that I do have the table uc_order_statuses in the database of my test site.
I think we're experiencing the same thing. Balance is never reduced to zero. I'm checking ubercart tables and some module functions to try to understand how Ubercart and Paypal works.
Somehow there should be a way to automatically change the order status even when Paypal Checkout is used. For now I could only hide that "pending" message.

Lyle, what do solution do you suggest?

Posts: 5620
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Hmm... well, the installation docs used to specify that you should enable the core modules first before adding the extra ones you'll need for your site. I'm going to revisit the docs soon to make them shorter and easier to follow... or at least I'll polish up and post the installation cheat sheet I started.

If I were you, I'd go ahead and uninstall the PayPal module now then reinstall it so it creates the order status correctly. This means you need to disable it from your module admin page and then go to the uninstall tab and uninstall it completely through that form.

Regarding IPNs from PayPal... as this thread indicates, they screwed up. Ubercart is receiving IPNs from PayPal, but it can't validate them. Since it can't validate them, it ignores the IPN... which is really a security feature and not a bug with Ubercart. It prevents people from spoofing your checkout and getting their orders for free.

Posts: 4
Joined: 06/01/2008

Hi Ryan. Thanks for your response. Yeah maybe it would be great if you'd give more installation notes.
I have tried to uncheck the paypal module and uninstall it as you've said. I installed the module again.
I tried purchasing something via Paypal Checkout on Sandbox mode. Still the same result. A user gets a success message but the order status is "Pending."

If the problem is just Paypal and the fact that we're testing on sandbox mode then this may not even be a big deal. Anyway no more problems. Thanks for the response.