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

How to detect closed onboarding window? #49

Open
JasonTheAdams opened this issue Oct 6, 2020 · 7 comments
Open

How to detect closed onboarding window? #49

JasonTheAdams opened this issue Oct 6, 2020 · 7 comments
Labels

Comments

@JasonTheAdams
Copy link

Greetings!

We're using the following for embedding the sign up link: https://developer.paypal.com/docs/platforms/seller-onboarding/build-onboarding/#step-2-embed-the-paypal-sign-up-link

As we're testing, we're finding that some folks are starting the process and closing (maybe they meant to change countries), or they're actually finishing the onboarding process but then closing the window instead of clicking "Go back to John's Store website".

When the user first clicks on the link, the SDK puts a dark overlay on the screen while the onboarding process goes on. If the user closes the window, the overly is simply removed. We can't seem to find a way to know if the user simply canceled the process — or if they did finish but didn't click the 'Go Back' button. There's checking the response.ok, but this seems to only cover errors, which these two scenarios don't appear to qualify as.

Any direction you're able to give for this? Thank you!

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.61. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@nixsin
Copy link

nixsin commented Oct 12, 2020

@JasonTheAdams The platform can use GET /v1/customer/partners/{partner_id}/merchant-integrations/{merchant_id} API documented here to get the onboarding status at any time.

https://developer.paypal.com/docs/api/partner-referrals/v1/#merchant-integration_status

@JasonTheAdams
Copy link
Author

Hi @nixsin!

I'm afraid that doesn't actually address the issue. Please imagine the following scenario:

  1. User clicks on "Connect to PayPal" button
  2. PayPal window displays and the user starts going through process
  3. At some point the user decides not to complete the onboarding and closes the PayPal window

At this point, our application is in a weird state. Once the user enters the onboarding flow the application sits in limbo of two possible scenarios:

  • The user is in the onboarding flow
  • The user has canceled and left the flow

We know if they've completed the flow, but we have no way of discerning (that I'm aware of) whether the user is still filling things out or if they've canceled the flow. So using the endpoint you mentioned isn't really helpful, as we can't act on the status — after all, if it's incomplete that may simply because they haven't finished. But having not finished isn't the same as having canceled.

Does this make sense?

@JasonTheAdams
Copy link
Author

Hoping to hear back on this in some capacity. Are you able to provide some insight, @gregjopa?

Thanks! 😄

@mnicpt
Copy link
Contributor

mnicpt commented Oct 20, 2020

@JasonTheAdams Let me know if this will work for you: https://codepen.io/mnicpt/pen/zYBBXzX?editors=1011

@JasonTheAdams
Copy link
Author

@mnicpt Thanks for the workaround. I admit it feels pretty hacky, as it's observing the document to see whether a very specific class is present and changes. If the SDK arbitrarily changed that class name (and why would someone assume it's being strongly referenced by implementors?) then this would stop working. That said, it does seem to do the trick.

Is there a more first-class method somewhere in the pipeline, per chance? I'm fine with this kind of solution for some known length of time, but if it's the indefinite solution then that makes me nervous.

I hope that makes sense!

@mnicpt
Copy link
Contributor

mnicpt commented Oct 26, 2020

@JasonTheAdams Yeah. Unfortunately, there is not a first-class method anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants