-
Notifications
You must be signed in to change notification settings - Fork 69
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
Fixes to enable using the new KYC for progressive onboarding. #9436
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +97 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
…ommerce-payments into dev/9393-embedded-kyc-po
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, elegant solution! Works according to the instructions 🚀 Pre-approved, left a few comments, once they're addressed - good to go!
client/onboarding/kyc/index.tsx
Outdated
{ | ||
source: source, | ||
}, | ||
'WCPAY_ONBOARDING_KYC' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed that getConnectUrl
function arguments are the same for detailsSubmitted true and false cases
Probably a mistake here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, sorry about that!
The intention here was to redirect to the Overview page if details are submitted (this is the case where a PO account has done initial KYC and go to the Connect page otherwise.
If the connect page will handle redirecting to the overview page in that case, this updated logic should work fine, but we should check it 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Dan, I'll check it 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked, it works 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention here was to redirect to the Overview page if details are submitted (this is the case where a PO account has done initial KYC and go to the Connect page otherwise.
Oh hell... I assumed that getConnectUrl
would retrieve the connect link provided through wcpaySettings.connectUrl
but it doesn't; it provides the Connect page URL :(
We should try and use connect URLs (not Connect page URLs) - like here, and let the connect logic figure out where to point the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oaratovskyi @dmallory42 It will probably work in the current state also because we have logic to redirect from all the places :)
I've added the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes make sense and the testing instructions checked out!
Fixes #9393
Changes proposed in this Pull Request
We use the same embedded KYC form to continue onboarding if the merchant drops off or needs to provide further business details (like with PO accounts).
Additionally, we record the
wcadmin_wcpay_onboarding_kyc_exit
Tracks event when merchants exit this embedded KYC, as opposed to the one in our MOX (that is recorded via thewcadmin_wcpay_onboarding_flow_exited
event with thestep:embedded
prop).Testing instructions
Prerequisites
npm run listen
on your local server. (if using local client)Embedded KYC
is enabled in the Dev Tools (if you don't see it, update the dev tools to the latest version)Overview
page, with the confetti and modal about receiving deposits appearing./payments/onboarding/kyc
page, and you should be able to see thecollect_payout_requirements
in the search query on the URL.progressive_onboarding
array:npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge