Closed (fixed)
Project:
Ubercart
Version:
6.x-2.4
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Dec 2009 at 06:58 UTC
Updated:
4 Apr 2011 at 15:26 UTC
Jump to comment: Most recent file
I also posted this question in the forum but it is probably more appropriate here...
I have Paypal (website payments standard) enabled as the sole payment method. I do not have Paypal Express Checkout.
After customers submit their order through PayPal, their cart remains full. They either have to manually delete the items from their cart or wait until the cart times out (I reduced that amount of time to 1 hour).
Is there a way to have the shopping cart automatically cleared after an order is process in PayPal?
Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 654092_empty_cart_on_IPN.patch | 2.42 KB | guypaddock |
| #6 | Picture 2.png | 43.56 KB | TheThumbPuppy |
| #6 | Picture 1.png | 40.41 KB | TheThumbPuppy |
Comments
Comment #1
stephthegeek commentedThis is a question for Ubercart, not the theme.
Comment #2
Bilmar commentedsubscribing
Comment #3
msc11 commentedThanks for directing me in the right direction!
Comment #4
msc11 commentedAdding more information:
Viewing order statistics, I have no completed orders on file. So, it looks as if orders are not being registered as completed once the customer submits their payment through PayPal. Or, is there something that I need to do to complete these orders?
Thanks for the help!
Comment #5
YK85 commentedHi, I was wondering if this is still an issue?
Comment #6
TheThumbPuppy commentedSame problem here
Drupal: 6.16
Ubercart: 2.2
Paypal is the only method of payment
I do not have Paypal Express Checkout
Orders are completed successfully: please see Picture 1
The shopping cart remains full: please see Picture 2
Any ideas on how to solve this problem?
Thank you in advance
Comment #7
jenb919 commentedHas anyone found a good solution for this?
I am having a similar problem with paypal when a user doesn't redirect back to the store. I added text the the checkout review pane to instruct customer to redirect back to the store, but I know that everyone doesn't read the messages. I also set up the redirect in the paypal sandbox account but it's only redirecting when you use a paypal account.
I am using
ubercart 2.2
drupal 6.16
uc_node_checkout 2.0
uc_pictured_cart_block 1.0
uc_restict_qty 1.1
any help would be greatly appreciated
Comment #8
guypaddock commentedI can confirm this problem still exists in UC 2.3 for 6.x, but this only happens if the user doesn't click the "Return to store" link on the PayPal site.
This can be a major issue, because the user might not think their order went through when they return to the website (users never read what sites like PayPal are telling them...), and they might make a double payment.
Comment #9
guypaddock commentedIt looks like this might have been mentioned in the following forum post:
http://www.ubercart.org/forum/support/2078/paypal_ipn_cart_not_empty
Also mentioned here:
http://www.ubercart.org/forum/support/14646/paypal_standard_users_closes...
Comment #10
guypaddock commentedI'm actively developing a patch for this issue. The problem is not technically with IPN handling for uc_paypal – it calls
uc_complete_salewhen the IPN status is "Completed" – but, unfortunately,uc_complete_saleappears to expect that it's being called from the same PHP session as the one the customer is using. For IPN, that isn't true, so it's not able to locate the user's cart in order to clear it.For logged-in users, that's an easy fix because the cart ID is just their user ID. Unfortunately, users who complete checkout before getting an account are assigned a completely random string for their cart ID, so during the IPN we will need some way to locate their cart. I may have to pass the cart ID along to PayPal as extra data, and then handle it on the other side.
Comment #11
guypaddock commentedThe attached patch appears to correct the issue. The cart ID is now passed as part of the invoice ID, in place of what was originally the timestamp. I'm not sure what benefit the original logic of passing a timestamp had; if that logic is again required in the future, we can always append it after the cart ID.
@Island Usurper, @Andy_Lowe, or another UberCart maintainer: perhaps you can enlighten me on why we were appending a timestamp to the invoice ID passed to PayPal?
Anyway, the cart ID is set in the session during the IPN handling so that
uc_complete_sale()can clear it out properly. I also noticed thatuc_complete_sale()was not passingFALSEin the call touc_cart_get_id(), which meant that in the case of the original IPN code, a new cart was created and then immediately emptied, which didn't make much sense. It was a small thing, but counter-intuitive and inefficient nonetheless, so I've patched this as well.Comment #12
fletch11 commentedIt Works!!! Thank you very much for this Guy and I really hope this gets committed.
Comment #15
Starminder commentedI need this too - did it get added to a build yet? Thanks!
Comment #16
fletch11 commenteddoes anyone know if this was committed?
Comment #17
torgospizzaIt has not been committed as of yet. Subscribing to this. Would love to get TR, Lyle or Andy to look at this. IPN has always needed a bit of help, and we've seen this issue before but never narrowed it down. Good work!
Comment #18
torgospizzaMaking this a current Version issue since the code is the same even in current -dev.
Comment #19
torgospizzaThe patch was applied cleanly, the logic looks good in it, to me anyway. Testing on production, will let you know if I see any side effects.
Comment #20
Island Usurper commentedI honestly don't remember why time() was part of the invoice ID. Possibly it was a check to make sure the IPN wasn't from some old, out of date order, but there doesn't seem to be any code to do that.
Thanks, and committed.
Comment #21
ratinakage commentedI am experiencing the same issue with 2CheckOut.
Could they be related or is this just with PayPal? Do you recommend applying the above patch on a production site?
Thanks...
Comment #23
bocaj commentedI am using Ubercart 2.4 and the changes to the patch above in #11 are not committed to this release as indicated in #20 above (actually that comment refers to 2.3, but shouldn't the changes still be in effect for 2.4?)
I am setting up a webstore and was testing the Paypal functionality when I ran into this issue and found this post. Could anyone provide feedback on this issue?
Thanks!
Comment #24
torgospizzaSeems you're right, the issue should actually have been listed as a 2.4 issue since I don't believe the fix made it in time. You should download the latest dev version instead.
Comment #25
tr commentedComment #27
silverwing commentedspam cleanup