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

ECE subscription product does not require user to be logged in, in checkout, and fails when the order is placed #9806

Closed
pierorocca opened this issue Nov 25, 2024 · 5 comments · Fixed by #9944
Assignees
Labels
focus: checkout payments priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.

Comments

@pierorocca
Copy link
Contributor

Describe the bug

On the product and cart pages, attempting to purchase a subscription using Apple Pay or Google Pay results in a system alert to be thrown requiring the shopper to be logged in. The shopper is then redirected to the login page. On checkout, there's no check, the payment sheet renders, the shopper can place the order, which then fails.

I thought I'd do a test, so I set tax to store address, removed NZ-specific taxes (I can calculate these afterwards), and set a $0.01 signup fee for a product.

I used Apple Pay, and was expecting a failure, but instead I was able to pay the $0.01 (at least, Apple Pay said it had been successful), but the store errored on checkout with "Account username is a required field".

I know that woocommerce will create the account username on checkout, and I also know that Apple Pay sends my email (because it asked me to), so is this another bug, or have I misconfigured something again? :)

Possible options:

  1. Alert the shopper as in the product and cart pages and require the shopper to login/register before processing the transaction
  2. Create the user if it doesn't exist and then process the transaction
  3. Other?
@pierorocca pierorocca added focus: checkout payments type: bug The issue is a confirmed bug. labels Nov 25, 2024
@pierorocca pierorocca changed the title ECE subscription product does not require user to be logged in, in checkout, and fails when the order is places ECE subscription product does not require user to be logged in, in checkout, and fails when the order is placed Nov 26, 2024
@pierorocca pierorocca added the priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. label Nov 28, 2024
@bborman22
Copy link
Contributor

@cesarcosta99
Copy link
Contributor

cesarcosta99 commented Dec 10, 2024

@pierorocca, I can't seem able to reproduce this locally, I'm going to try in a new JN instance. Do you know what are the reproduction steps for me to try? It's unclear to me whether I need to set up taxes and/or sign-up fee for the subscription.

Edit: I've tried paying with ECE while logged out at the product, cart and checkout pages. All resulted in successful payment with new account created.

Also, the quotes in the issue are from a ticket? If so, would be nice to have a link for me to check it.

@pierorocca
Copy link
Contributor Author

Hey @cesarcosta99 sorry about that. There's one 9054329-zd-a8c that covers several GH issues. Guest checkout needs to be disabled, and the product a simple subscription. You must be logged out of the site. On the product page the shopper will get a system alert while on the cart and checkout pages weird behavior and an obscure error after what appears to be a successful wallet transaction.

Video is a bit long but it shows the many issues including some issues with Apple Pay not updating shipping addresses and shipping rates.

W2h04y.mov

@pierorocca
Copy link
Contributor Author

pierorocca commented Dec 11, 2024

@elizaan36 what would you recommend as an alternative to this flow that ends with an obscure error?

E.g. on cart or checkout, first redirect to the login/sign-up screen?

@cesarcosta99
Copy link
Contributor

cesarcosta99 commented Dec 11, 2024

@pierorocca, I figured this is a Blocks issue, it's not taking the guest checkout settings into consideration. Shortcode cart and shortcode checkout works the same as in the product page, that is, an alert is displayed to the user and if they confirm, they are redirected to the login page.

Image

So, the following settings influences what happens in this test case and we have some scenarios to consider:

Image

This is what's happening at the moment in each scenario:

Case Guest checkout enabled Subscription create account at checkout Result
1 Transaction is successfully processed and new account is created
2 Transaction is successfully processed and new account is created
3 Alert with login redirect is displayed
4 Alert with login redirect is displayed

what would you recommend as an alternative to this flow that ends with an obscure error?

My recommendation is to keep things as is and fix this Blocks issue to make it match what we expect to happen, in the case you described: display the alert and then redirect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: checkout payments priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants