2
Answers
Vote up!
1
Vote down!

Anonymous user not logged in after Paypal WPS redirect

I have set up a Drupal Commerce shop with one payment method (Paypal WPS). Using Paypal WPS is difficult enough for users not accustomed to it and I want keep the process on the Drupal Commerce side as simple as possible. For this reason, I don't want anonymous users to have to go through the account registration process in order to make a purchase. They should do the following at checkout:

1. Review Order
2. Enter Shipping Address
3. Get redirected to Paypal on clicking continue.
4. Complete the Paypal form and confirm
5. Redirect back to drupal commerce and see their order confirmation without additional clicks.

The problem is that when the anonymous user is redirected back to Drupal Commerce, they see a page with the following: "Your order is number ####. You can view your order on your account page when logged in." If they click on "view your order" link, they get "Access denied. You are not authorized to access this page." Since I don't want require customers to register on the site (at least not overtly), requiring them to login in order to see their order confirmation doesn't work. It's fine if an account is automatically created without adding extra hoops for the user to jump through like account verification emails, but how can I make it so they are logged in prior to the Paypal redirect so they are already logged in when they come back to achieve #5 above?

Or maybe there is another way to achieve the behavior in #5? I tried disabling the checkout rules, "Assign an anonymous order to a pre-existing user" and "Create a new account for an anonymous order", but I still experience the same problem.

I will really appreciate any assistance.

Asked by: agileox
on June 6, 2012

Comments

looks like this is still an issue, for anonymous users with paypal.
How do I force the redirection back to a "thankyou" or homepage instead of ..drupal/user/0/orders/11

- Paul Wilson on February 19, 2016

found out my permissions for Anonymous to view own Order was not enabled, once I gave permission it allowed user to view order on return from paypal

- Paul Wilson on February 19, 2016

2 Answers

Vote up!
0
Vote down!

I have got the same problem as this and I imagine the current system is not optimal for the majority of online shops.

In my case I do want unique individual user accounts created at checkout, but I want them to be able to see an order confirmation page that shows everything relevant to their order instead of the "You can view your order on your account page when logged in".

It would be simple I imagine to set that up if they could be automatically logged in initially.

There's no action in rules to log someone in. I tried to see if it worked if I could redirect to the one time login URL automatically but the token won't get translated.

I can see a likely simple way to work around this though as you can output a message to the following page with tokens for the order details to work as a kind of substitute order confirmation page.

Answer by: mjcarter
Posted: Jul 18, 2012