14 replies [Last post]
AntoineSolutions's picture
Offline
Bug Finder
Joined: 05/02/2008
Juice: 166
Was this information Helpful?

I am having an issue where any orders placed in Ubercart result in the cart/checkout/complete page not showing an order number. The order is actually being created and the Payment Status is being set to Payment Received. Having read the posts below, it seems this might be related to workflow or my payment gateway.

I am currently using the following modules:
workflow-ng 5.x-2.1
uc_payflowpro 5.x-dev

I have read the following posts related to the issue and none seem to be my issue:
http://www.ubercart.org/contrib/140
http://www.ubercart.org/forum/support/2977/there_isnt_order_complete_mes...
http://www.ubercart.org/forum/support/5472/orders_not_going_through
http://www.ubercart.org/forum/bug_reports/4713/checkout_problem

I will begin debugging through this, but if anyone has suggestions on what might be the issue, please give me some hints/tips on what to check.

Cheers,

Jon Antoine
Antoine Solutions
Free Open Source PHP IDE

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: order number is .

Is the bug appearing only in IE by any chance? A similar issue was posted here. If so, follow-up in that thread and we'll go from there.

AntoineSolutions's picture
Offline
Bug Finder
Joined: 05/02/2008
Juice: 166
Ryan, Thanks for responding

Ryan,

Thanks for responding to this issue. I have spent the last 3 weeks working on getting a PHP IDE setup so I could correctly debug this and future issues. Having just got it working today, I was able to find the cause of this issue. I am using the uc_payflowpro module for my payment processing. This module is pre-maturely calling the uc_cart_complete_sale function to create the user and discarding the output. The function is then called a second time by the uc_cart_checkout_complete function but by then, the session information has been cleared.

If you can point me to any documentation as to how this should be done, I'd greatly appreciate it.

Cheers,

Jon Antoine
Antoine Solutions
Free Open Source PHP IDE

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Ryan, Thanks for responding

I just ran into this issue! But I don't know why! Sticking out tongue

It has to do with cart_order being lost somewhere along the line so that uc_cart_complete_sale() gets called with a blank order object. That's why the order never gets updated. It could be the whole session getting reset.

Are you using HTTP/HTTPS? If so, which pages are protected? Also, do you have it set to login new users upon checkout?

In the meantime I've committed a fix that will prevent UC from running uc_cart_complete_sale() on an empty order and let the customer know they need to contact you to confirm order completion.

AntoineSolutions's picture
Offline
Bug Finder
Joined: 05/02/2008
Juice: 166
Hey Ryan, Sorry it took me

Hey Ryan,

Sorry it took me so long to respond, I've been on vacation the last 4 days. I am using secure pages module to get a mix of HTTP/HTTPS pages. The only pages I have added to the defaults are "cart/checkout*". I have it set to revert back to HTTP when appropriate. I also have it set to log new users in upon checkout, but this hasn't been working, possibly a side effect?

I appreciate the commit to check for an empty order, but this happens with every purchase so I won't be able to go live until this issue is resolved. I just updated to Ubercart 1.3 and am still seeing the issue. I'm going to dig through the code and I'll let you know if I find anything else.

Cheers,

Jon Antoine
Antoine Solutions
Free Open Source PHP IDE

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Hey Ryan, Sorry it took me

Try various different payment methods, too... someone else had this issue only with bank transfer payment, though that worked fine on the Livetest. Puzzled It's quite a persistent little bug...

AntoineSolutions's picture
Offline
Bug Finder
Joined: 05/02/2008
Juice: 166
uc_payflowpro to blame

Ryan,

In my case, uc_payflowpro was too blame. The module was incorrectly calling the uc_cart_complete_order function. I have fixed the issue and posted a patch to the uc_payflowpro module on d.o at http://drupal.org/node/291538. With this issue fixed, the only thing I am noticing is that when the user is logged in automatically after a purchase, their user specific menu is not complete. It is only showing "recent posts" and does not provide a link to their account or for them to log out. Not a huge issue, but just curious if this is a bug or part of drupal functionality.

Cheers,

Jon Antoine
Antoine Solutions
Free Open Source PHP IDE

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: uc_payflowpro to blame

Could it be that you put My account and Logout links elsewhere in the menu, like in the primary links? I noticed on the Livetest that by putting /user into the primary links it removed it from the navigation menu... at least I think it did that automatically. Sticking out tongue

AntoineSolutions's picture
Offline
Bug Finder
Joined: 05/02/2008
Juice: 166
Only happens on cart/checkout/complete

Ryan,

Sorry, I guess I forgot to mention that this is only the case for the cart/checkout/complete page. Once I begin browsing the site after the user is created, the menu is fine. I have not tested whether this happens for existing users, I will test that first thing tomorrow.

Cheers,

Jon Antoine
Antoine Solutions
Free Open Source PHP IDE

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Only happens on cart/checkout/complete

Someone else posted that issue... I'm not entirely sure how solvable it is. I kind of wonder if it depends on the order different parts of the page are rendered in Drupal. In other words, the login might occur after the blocks are rendered or something.

scottrigby's picture
Offline
Getting busy with the Ubercode.
Joined: 10/08/2007
Juice: 121
Hi Ryan, I'm getting this

Hi Ryan,

I'm getting this error too.

After paypal order's complete, the link on the /cart/checkout/complete page "click here to view your current order status and order history" sent me to user/0/orders

I had 'Enable anonymous checkout (users can checkout without logging in)' selected.

But I did not have 'Login users when new customer accounts are created at checkout' set. Now I have this selected, but I run into the same problem when returning to the merchant after payment (using a new email address, which does successfully create a new account – it sends me an email, but still doesn't auto-log me in, and the link goes to user/0/orders).

There's another thing – I'm now getting errors in paypal checkout... "This is a non-secure form. This form will be sent in a way that is not secure. Are you sure you want to send it?" (attaching screenshot). This is the first time I've seen it. Could there be any relationship between these issues?

Has Paypal updated their api or something?

Thanks for your help –
Scott

AttachmentSize
Non Secure Form error 32.53 KB
scottrigby's picture
Offline
Getting busy with the Ubercode.
Joined: 10/08/2007
Juice: 121
Re: Hi Ryan,

Actually I just realized Ubercart has been updated, and I was still using 5.x-1.0-rc4 -- I just upgraded to 5.x-1.3

Now, rather than giving that link to user/0/orders, I just get this message:
Thank you for shopping at [mysite]. Your current order has been attached to the account we found matching your e-mail address.

So users are still not being logged-in.

Could it be -- that I'm using an email address for a user I had previously registered? I only have so many email addresses to test... and so I delete the user before testing this functionality again (because I'm testing auto-registering/auto-logging-in after payment). I deleted the user both through drupal's user admin, and through Ubercart's administrative interface (the 'x' delete user button in ubercart) - and deleting the orders for those users too. Could Ubercart be storing the past info and making this difficult?

Thanks so much for your help – our site (a live site) is totally useless now until this is resolved (there are other problems too that I will add in a separate issue).

Thanks!
Scott

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Hi Ryan,

Hmm... sounds like several issues here, and some did get resolved in the 1.3 update, right? As for the checkout message, you might want to review the Checkout messages settings form to make sure there aren't any actual links in there to a particular user's orders. The message you're getting where you weren't auto-logged was the one for previously existing accounts... I'd doublecheck that.

I'll run a test payment on the Livetest to see if I get the same trouble.

scottrigby's picture
Offline
Getting busy with the Ubercode.
Joined: 10/08/2007
Juice: 121
Hi Ryan, it's not clear to

Hi Ryan,

it's not clear to me what the update resolved for this issue. Maybe it did – but my results are not clear yet.

One thing – that the message changed... this is new (I'm using the default message, by the way). And yes, it's definitely better than getting the wrong link on the confirmation message. But it still seems like the wrong behavior, because it doesn't auto-login the user. (I suppose I could always change the message to help explain current behavior in the meantime).

But maybe the behavior is attributable to using an email that had been used previously (I delete my test account before trying again - because I just ran out of emails to test with Smiling -- I'll wait to hear your advice about this one...

Also I just realized the link problem now extends to the order confirmation email. The order number link is somethign like this now: http://MYSITE/user/0/order/623
This is a real problem now - maybe even worse... because even after logging in, the user still has this email with the wrong link.

scottrigby's picture
Offline
Getting busy with the Ubercode.
Joined: 10/08/2007
Juice: 121
Ryan wrote:The message
Ryan wrote:

The message you're getting where you weren't auto-logged was the one for previously existing accounts... I'd doublecheck that.

I'll run a test payment on the Livetest to see if I get the same trouble.

#1
Ok so I just checked using a different email address – and it seems to work ok now! Smiling That's great for new accounts (which is who we care about the most). As for past accounts, Is there a table I should look at for deleting past user emails?

#2
Ok, the hard issue for us now is the invoice link in the email... it's not leading anywhere. We're using the default email notification template too (I'm tempted to remove it for now)... So this seems like a legitimate bug, yes? If so, should I report it in the bugs section on this site?

Thanks for your advice – Scott