Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rajeshraval786 opened this issue Sep 3, 2021 · 12 comments
Labels
priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: enhancement The issue is a request for an enhancement.

Comments

@rajeshraval786
Copy link

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
Copy link
Contributor

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:

  • The customer selects the PP button from the cart
  • The customer enters payment details via the PP popup
  • The customer is redirected to the order confirmation page (checkout)
  • The customer confirms the order and is finally redirected to the thank you page

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
Copy link
Author

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

@chickenn00dle chickenn00dle added type: enhancement The issue is a request for an enhancement. priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. labels Sep 3, 2021
@chickenn00dle
Copy link
Contributor

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.

@chickenn00dle chickenn00dle reopened this Sep 3, 2021
@rajeshraval786
Copy link
Author

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
Copy link
Contributor

That's right.

@rajeshraval786
Copy link
Author

But earlier we were not facing this issue on the website

@rajeshraval786
Copy link
Author

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
Copy link
Contributor

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:

// Navigate to order confirmation URL specified in original request to PayPal from back-end.
if ( ! wc_ppec_context.use_checkout_js ) {
const query_args = '?woo-paypal-return=true&token=' + data.orderID + '&PayerID=' + data.payerID;
return actions.redirect( return_url + query_args );
}
return actions.redirect();
}

Otherwise, when triggered from checkout, we instead manually trigger the checkout form when returning from PayPal here:

if ( fromCheckout ) {
// Pass data necessary for authorizing payment to back-end.
$( 'form.checkout' )
.append( $( '<input type="hidden" name="paymentToken" /> ' ).attr( 'value', ! wc_ppec_context.use_checkout_js ? data.orderID : data.paymentToken ) )
.append( $( '<input type="hidden" name="payerID" /> ' ).attr( 'value', data.payerID ) )
.trigger( 'submit' );

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

@rajeshraval786
Copy link
Author

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

@rajeshraval786
Copy link
Author

and in inspect I am getting something like

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.

@chickenn00dle
Copy link
Contributor

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
Copy link
Author

Ok, Thanks for giving your valuable time.

@chickenn00dle chickenn00dle changed the title Paypal express checkout popup button redirecting back to our website for confirm order Provide option to process order and go to thankyou when returning from PayPal via cart or product pages Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

No branches or pull requests

2 participants