woocommerce/woocommerce-gateway-stripe

Improve Connection modal UX for accounts connected via Stripe App

Closed this issue · 0 comments

Describe the bug

If the store is connected to via the WooCommerce Inc Stripe app there's currently no feedback in the UI.

For HE's working with these merchants it might be key information to help troubleshoot their issue. We should improve the UI to flag this connection type. On top of that, we could add additional tools and statuses to improve situations when the connection is invalid due to expired keys.

Screenshot 2024-08-09 at 3 08 49 PM
App OAuth Keys have expired

Screenshot 2024-08-09 at 2 03 52 PM
Account still "Connected"

To Reproduce
Steps to reproduce the behavior:

  1. Set your account keys to an account already connected to a different Stripe App.
    • Diego has keys for an account in this situation.
  2. Go to your Stripe settings.
  3. Open the connection modal.
    • Notice the URL is marketplace.stripe.com - ie connecting via App.

Screenshot 2024-08-09 at 2 58 27 PM

  1. Click on the Create or connect a test account
    • You should land on a page like this:

Screenshot 2024-08-09 at 3 02 27 PM

  1. Connect to an account (this can be any of our accounts, it doesn't need to be the same as the original one).
  2. Once you return to the store check your Stripe settings option.
    • Your test_secret_key will start with rk_test_
    • The test_connection_type will be set to app
  3. In the Tools > Scheduled Actions screen search for wc_stripe_refresh_connection.
  4. Cancel the pending action.
  5. In 1 hour your keys will eventually expire and in the account details section of the settings there will be a message about invalid. See screenshots at the top of this issue.

Expected behavior
Stores that are connected to our Stripe app may act a little differently. Their keys need to be refreshed every hour and failing to do so will result in issues.

Other than running the scheduled action, there's no way to run a key refresh.

We should flag these stores differently in the UI and consider adding a tool they can use to reconnect.