woocommerce / woocommerce-gateway-paypal-express-checkout

58 stars 65 forks source link

Provide option to process order and go to thankyou when returning from PayPal via cart or product pages #885

Open rajeshraval786 opened 2 years ago

rajeshraval786 commented 2 years ago

Hello Team

I am suffering from the issue when I place an order from the cart using PayPal express checkout popup button and it's redirecting me back to the checkout page to confirm the order and then I press the place order button and after that my order is going to be completed earlier that issue is not there now, How can I skip place order button and redirecting them to direct on thankyou page in woocommerce.

Give me any solution, please...

Thanks in advance.

chickenn00dle commented 2 years ago

Hey @rajeshraval786 👋

I am suffering from the issue when I place an order from the cart using PayPal express checkout popup button and it's redirecting me back to the checkout page

Just to make sure we are on the same page, here is what I'm understanding the issue to be:

If this is correct, then this is actually expected behavior. The only time you should immediately be redirected to the thank you page is when placing the order from checkout. Every other time, we want to direct customers to this confirmation page to give them a chance to verify the order details and finalize the order.

rajeshraval786 commented 2 years ago

Yes, Exactly but is there any solution for skip the confirmation page and place directly order.

chickenn00dle commented 2 years ago

There is not a way to change this behavior. I'm not too sure whether removing the ability for customers to confirm their order in WC is something we should be doing either.

That said, I'll go ahead and re-open this issue and make it an enhancement request. Although, as a heads up, it's unlikely we will be able to look into this in the near future.

rajeshraval786 commented 2 years ago

So for now confirmation page is remaining as it is, we can't do anything with this plugin to skip that page and direct redirecting on thankyou page.

chickenn00dle commented 2 years ago

That's right.

rajeshraval786 commented 2 years ago

But earlier we were not facing this issue on the website

rajeshraval786 commented 2 years ago

A few Days ago, the PP button stopped working and suddenly vanished from the website. Somehow we managed to get it back. and after that only, this new issue occured.

chickenn00dle commented 2 years ago

and after that only, this new issue occurred.

Hmm. This shouldn't have been working this way before your PP button vanished and if it was, it may have been a bug.

When triggered from cart or product pages, we explicitly redirect back to checkout when returning from Paypal here: https://github.com/woocommerce/woocommerce-gateway-paypal-express-checkout/blob/85a478de146459418b23854cca4a60f073344dbf/assets/js/wc-gateway-ppec-smart-payment-buttons.js#L191-L198

Otherwise, when triggered from checkout, we instead manually trigger the checkout form when returning from PayPal here: https://github.com/woocommerce/woocommerce-gateway-paypal-express-checkout/blob/85a478de146459418b23854cca4a60f073344dbf/assets/js/wc-gateway-ppec-smart-payment-buttons.js#L184-L189

This has been the case for at least the last year if not longer.

rajeshraval786 commented 2 years ago

yes exactly I am getting this type of URL ?woo-paypal-return=true&token is there any solution to resolve this? please

rajeshraval786 commented 2 years ago

and in inspect I am getting something like

chickenn00dle commented 2 years ago

yes exactly I am getting this type of URL ?woo-paypal-return=true&token is there any solution to resolve this? please

As I mentioned, this is expected behavior and this is not something that can be changed.

Since your browser does not support JavaScript, or it is disabled, please ensure you click the Update Totals button before placing your order. You may be charged more than the amount stated above if you fail to do so.

It might be a good idea to reach out to our support team who can help with store-specific issues.

Issues in this repository are for reporting more general issues specific to the plugin.

rajeshraval786 commented 2 years ago

Ok, Thanks for giving your valuable time.