Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
164 stars 67 forks source link

Possible issue with sandbox onboarding #8990

Open dmallory42 opened 1 week ago

dmallory42 commented 1 week ago

Describe the bug

As mentioned in this Slack thread: p1718875622258119-slack-C03KTTK2YMA

There seems to be a possible issue with onboarding in sandbox mode in some cases

To Reproduce

  1. Use Jurassic Ninja to create a new site (this is necessary because it's not possible to test this flow with the Dev Tools plugin installed)
  2. Install WooCommerce, go through the onboarding, and install WooPayments as part of this.
  3. Click on the Get Paid task on the WooCommerce Home page.
  4. On the WooPayments onboarding page, click "Setting up store for a client" and then Enable sandbox.

Expected behavior

When sandbox mode is enabled, via the onboarding wizard, the Stripe KYC should always be in test mode, meaning it is possible to enter fake test data to pass the onboarding.

Actual behavior

There are some reports (see Slack link above) that sandbox mode isn't properly initialised, and the user is taken to a live Stripe KYC.

I haven't been able to reproduce, but it may be worth testing with different store countries to see if that leads to reproducing the issue. In the Slack thread, it was onboarded as a merchant from the Netherlands.

dmvrtx commented 1 week ago

Steps that reproduced the issue for me, using Safari browser:

anu-rock commented 1 week ago

Setting a priority of low for now since it's not always reproducable as per the linked Slack thread.

anu-rock commented 1 week ago

Thanks for the report, @dmvrtx and @dmallory42 🙌

dmallory42 commented 1 week ago

My suspicion here is the cause may be when we redirect to the Jetpack auth flow. When I tested, I did Jetpack auth as part of the WooCommerce Core profiler, so I redirected directly from WooPayments -> Stripe without going through Jetpack as an intermediate step.