3 replies [Last post]
quaoar's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Not Kulvik
Joined: 08/08/2007
Juice: 179
Was this information Helpful?

On our latest store, using code form the Bazaar, we have discovered a small problem with some orders - like one out of 200 - which is processed and paid for but still has uid set to 0.
I haven't been able to reproduce this myself, but it's happening from time to time. It seems to be a combination of anonymouse chekcout and custom payment module, but looking at the code and the data in the database, I just can't see where the problem should be.

The latest order with this problem was created with timestamp 1216010638 with user created at 1216011250.
Order primary_email is correct and therefore the code in uc_cart_complete_sale() should have either picked up the right uid or created a user and then updated the order with the right uid. But uid is still 0.
Because of this I can't really see where our custom payment module could interfere either... As long as uc_cart_complete_sale() is called and the order has a primary_email, order->uid should be updated and not remain 0.
Has anyone else experienced anything like this? I'm a bit unsure about where to look so any tips will be greatly appreciated.

Edited:
Because I write english like a norwgian =/

Erlend Strømsvik
Ny Media AS
erlend@nymedia.no

wadehays's picture
Offline
Joined: 02/10/2008
Juice: 103
Re: uid => 0 on some orders

+1 we have seen this a couple of times in the past month or so. Using 1.0 code with PayPal WPP.

www.PrintersCloset.com - Epson professional graphics printers and supplies for photographers, fine art galleries, sign printers and commercial printing companies.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: uid => 0 on some orders

Oh! Maybe I've seen this, too... I was working on a test site and if I checked out anonymously using the e-mail address of an existing account, I'd get the existing user checkout message but the order would never get attached to my account. In the test site, I updated uc_cart.module to the latest Bzr version and the problem went away. I'm not sure if this is a fix for everyone, but it's worth a shot. You might try to duplicate the problem as I described first.

vitis's picture
Offline
Joined: 08/14/2009
Juice: 42
Customer ID = 0

In my Authorize.net account (with CIM), all my Customer IDs are 0. Authorize.net says the Customer ID variable must not be being passed correctly from Ubercart. The needed variable is x_cust_id .

I have a Dec 09 dev of the latest Ubercart and uc_recurring.

Please let me know how you solved this.

also see http://www.ubercart.org/forum/support/13930/authorizenet_not_saving_cust...

Update: If customer is already a user and is logged in, uid gets passed correctly to Authorize.net. So, anonymous checkout passes info through gateway when checkout is complete without the new uid (probably before new uid is created).

Also, if the customer is already a user and purchases a new role while not logged in, uid does not get passed to Authorize.net. Though ubercart does tell the user they already have a user account.