I don't have much information on this yet, and plan to dig into it more tomorrow. I have confirmed that this was working correctly when running 7.x-3.0-rc3, and is now failing in 7.x-3.0-rc4 (and since the release notes for the stable 7.x-3.0 make no mention of a bug fix, I assume that the problem will exist there as well).

I am using PayPal Express Checkout. From the cart page, I click over to PayPal to pay. I login and choose my payment info, and am sent back to the "Submit Order" page on the Drupal site, where I have to click the Submit Order button to complete the order. In rc3, this would submit the order successfully, create a new user, and show a confirmation page. In rc4, it kicks me back to the cart page, with my selected item listed in the cart.

There are no errors displayed on-screen or appearing in watchdog, and nothing in the Apache error log.

I confirmed that this was an rc4 issue by:

  • Checkout the commit immediately before updating to rc4
  • Confirm that checkout process works correctly
  • Checkout the commit in which I updated Ubercart to rc4 (no other changes were made in this commit)
  • Attempt checkout process and get the results explained above
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave’s picture

Possibly a duplicate of #1422588: Fatal error when submitting payment, please test the patch in that issue.

Odonay’s picture

No, it's not a duplicate of that problem. I tried the patch with no success.

I also tried replacing my PayPal module in my release build, with the RC3 PayPal code, and that didn't help either.

I'm still getting kicked back to my cart. However, my orders are being marked as complete/emails are being sent.

I believe it may have something to do with Ubercart itself.

jerry’s picture

For what it's worth, I may be seeing something similar with the Authorize.Net SIM/DPM payment module. Checkout is successful, status is changed, mail is sent, but the user is kicked back to the (now-empty) shopping cart with no completion message. This was working fine through RC3; not sure that I checked it in RC4, but it's broken in the 3.0 release. I also suspect a change in the Ubercart checkout process, but I haven't had time to dig into it yet.

Odonay’s picture

For my users, they are returned to a cart that still has the items in it. It basically appears as if nothing has happened.

I did however, get it to go to a completion page through the Test Payment Gateway, but that isn't much help for getting PayPal to work :)

BrockBoland’s picture

I got the same as Odonay: back at the cart, with the item(s) in it. I haven't had a chance to try the patch from #1422588: Fatal error when submitting payment, but I did glance at it and would be surprised if it solved this issue—it looks like it addresses something else.

Odonay’s picture

Has anyone else looked into this? For now, would it be wise to revert back to RC3? :/

BrockBoland’s picture

I'll be digging into it over the weekend. I'd like to avoid ever moving backwards in versions, but that may well be the best course of action here.

wodenx’s picture

Status: Active » Needs review
FileSize
971 bytes

Sorry, I have been away. Please try the attached patch.

wodenx’s picture

This version should fix the same bug in several other places...

jerry’s picture

wodenx confirms my suspicion stated above about a change in the UC checkout process. Starting with RC4, the "do_complete" session variable was restructured. Good catch.

wodenx’s picture

We definitely need to write some coder-upgrade tests to catch some of these changes. I will try to get to that soon.

BrockBoland’s picture

Thanks wodenx! I tested out the patch from #9 and the checkout process is now working correctly—for the most part. I'm using uc_roles to assign a role to users, but that's not working. I'm not sure yet if this is related to the same change that caused the problem with checkout or not. "do_complete" does not appear in uc_roles at all. This is true for both anon and authenticated users.

I'm going to dig into this more and see whether it's related or not. If it turns out to be a separate issue, this item is RTBC.

BrockBoland’s picture

Looks like my uc_roles issue is indeed related: using the Test Payment Gateway, it worked correctly.

BrockBoland’s picture

Status: Needs review » Needs work
BrockBoland’s picture

Nevermind me. I should have checked this first, but the orders in question have a status of Pending, which is why the roles were not added.

Again: this could be related, but I'm not sure yet.

jerry’s picture

FWIW, I see unmodified references to $_SESSION['do_complete'] in the UC 3.0 versions of uc_cybersource, uc_google_checkout and uc_credit as well. Dunno what problems this might be causing for their users.

For the uc_authorizenet_simdpm module, I've used this check to try to avoid breaking checkout for users of RC3 and earlier:

// The 'do_complete' session variable moved starting with Ubercart 3.0-RC4 (uc_order schema == 7007)
$version = db_query("SELECT schema_version FROM {system} WHERE type = 'module' AND name = 'uc_order'")->fetchField();
if ($version < 7007) {
  $_SESSION['do_complete'] = TRUE;
}
else {
  $_SESSION['uc_checkout'][$_SESSION['cart_order']]['do_complete'] = TRUE;
}

uc_order conveniently had a schema version change between RC3 and RC4. Might be worth doing something like that here, too.

BrockBoland’s picture

Status: Needs work » Reviewed & tested by the community

jerry: I think that an issue in the uc_authorizenet_simdpm would be appropriate for that.

I opened #1429460: PayPal Express Checkout not finishing checkout process to handle the rest of the problems I've been having. wodenx's patch from comment #9 does what it's supposed to and fixes that problem.

jerry’s picture

I think that an issue in the uc_authorizenet_simdpm would be appropriate for that.

I forgot that the PayPal payment module was bundled, so you're right; backward compatibility is not an issue here. I do think that the unmodified references to the session variable in the other bundled payment modules that I listed are relevant to the Ubercart issue queue, though.

wodenx’s picture

@jerry: I think the other references are caught in the patch at #9.

longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed #9.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.