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

feat: add Upi intent flow #2673

Merged
merged 14 commits into from
Jun 3, 2024
Merged

feat: add Upi intent flow #2673

merged 14 commits into from
Jun 3, 2024

Conversation

longyulongyu
Copy link
Contributor

@longyulongyu longyulongyu commented May 7, 2024

Summary

UPI with the upi_intent flow:

For mobile:

  • We should show upi_collect or upi_intent depending on if apps are returned in /paymentMethods response
    If the apps list is returned, we show them in a radio group, we always show the vpa input as the last option.
    If the apps list is not returned or empty, we fall back to the old vpa flow.
  • Submitting one of the upi_intent apps triggers await action. We should redirect the shopper to the corresponding apps. The redirect url comes from the BE action response.
  • The upi_qr should always be on the second tab

For non-mobile:

  • We should never show the upi_intent (ignore apps in /paymentMethods response)
  • The upi_qr should be on the first tab and the upi_collect should be on second tab

For UPI in the drop-in:

  • The drop-in component shows only one upi component if the parent upi tx_variant is found.

Test UPI component locally

Tested scenarios

Added tests

Fixed issue: COWEB-1353

@longyulongyu longyulongyu self-assigned this May 7, 2024
Copy link

changeset-bot bot commented May 7, 2024

🦋 Changeset detected

Latest commit: a0ad5d9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@adyen/adyen-web Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented May 7, 2024

Size Change: +13.6 kB (+1.18%)

Total Size: 1.16 MB

Filename Size Change
packages/lib/dist/adyen.js 306 kB +3.23 kB (+1.07%)
packages/lib/dist/cjs/index.js 267 kB +3.33 kB (+1.27%)
packages/lib/dist/es.modern/ar.js 7.13 kB +164 B (+2.35%)
packages/lib/dist/es.modern/cs-CZ.js 6.28 kB +66 B (+1.06%)
packages/lib/dist/es.modern/da-DK.js 5.69 kB +69 B (+1.23%)
packages/lib/dist/es.modern/de-DE.js 6.18 kB +77 B (+1.26%)
packages/lib/dist/es.modern/el-GR.js 8.04 kB +104 B (+1.31%)
packages/lib/dist/es.modern/es-ES.js 5.84 kB +89 B (+1.55%)
packages/lib/dist/es.modern/fi-FI.js 5.84 kB +88 B (+1.53%)
packages/lib/dist/es.modern/fr-FR.js 6.05 kB +72 B (+1.2%)
packages/lib/dist/es.modern/hr-HR.js 6.1 kB +90 B (+1.5%)
packages/lib/dist/es.modern/hu-HU.js 6.37 kB +74 B (+1.18%)
packages/lib/dist/es.modern/index.js 127 kB +1.26 kB (+1%)
packages/lib/dist/es.modern/it-IT.js 5.89 kB +65 B (+1.12%)
packages/lib/dist/es.modern/ja-JP.js 6.8 kB +82 B (+1.22%)
packages/lib/dist/es.modern/ko-KR.js 6.43 kB +95 B (+1.5%)
packages/lib/dist/es.modern/nl-NL.js 5.85 kB +71 B (+1.23%)
packages/lib/dist/es.modern/no-NO.js 5.69 kB +92 B (+1.64%)
packages/lib/dist/es.modern/pl-PL.js 6.36 kB +81 B (+1.29%)
packages/lib/dist/es.modern/pt-BR.js 5.87 kB +84 B (+1.45%)
packages/lib/dist/es.modern/pt-PT.js 5.99 kB +69 B (+1.17%)
packages/lib/dist/es.modern/ro-RO.js 6.15 kB +85 B (+1.4%)
packages/lib/dist/es.modern/ru-RU.js 7.5 kB +95 B (+1.28%)
packages/lib/dist/es.modern/sk-SK.js 6.47 kB +89 B (+1.4%)
packages/lib/dist/es.modern/sl-SI.js 6 kB +74 B (+1.25%)
packages/lib/dist/es.modern/sv-SE.js 5.68 kB +77 B (+1.37%)
packages/lib/dist/es.modern/zh-CN.js 6.22 kB +82 B (+1.34%)
packages/lib/dist/es.modern/zh-TW.js 6.32 kB +93 B (+1.49%)
packages/lib/dist/es/ar.js 7.13 kB +164 B (+2.35%)
packages/lib/dist/es/cs-CZ.js 6.28 kB +66 B (+1.06%)
packages/lib/dist/es/da-DK.js 5.69 kB +69 B (+1.23%)
packages/lib/dist/es/de-DE.js 6.18 kB +77 B (+1.26%)
packages/lib/dist/es/el-GR.js 8.04 kB +104 B (+1.31%)
packages/lib/dist/es/es-ES.js 5.84 kB +89 B (+1.55%)
packages/lib/dist/es/fi-FI.js 5.84 kB +88 B (+1.53%)
packages/lib/dist/es/fr-FR.js 6.05 kB +72 B (+1.2%)
packages/lib/dist/es/hr-HR.js 6.1 kB +90 B (+1.5%)
packages/lib/dist/es/hu-HU.js 6.37 kB +74 B (+1.18%)
packages/lib/dist/es/index.js 148 kB +1.52 kB (+1.04%)
packages/lib/dist/es/it-IT.js 5.89 kB +65 B (+1.12%)
packages/lib/dist/es/ja-JP.js 6.8 kB +82 B (+1.22%)
packages/lib/dist/es/ko-KR.js 6.43 kB +95 B (+1.5%)
packages/lib/dist/es/nl-NL.js 5.85 kB +71 B (+1.23%)
packages/lib/dist/es/no-NO.js 5.69 kB +92 B (+1.64%)
packages/lib/dist/es/pl-PL.js 6.36 kB +81 B (+1.29%)
packages/lib/dist/es/pt-BR.js 5.87 kB +84 B (+1.45%)
packages/lib/dist/es/pt-PT.js 5.99 kB +69 B (+1.17%)
packages/lib/dist/es/ro-RO.js 6.15 kB +85 B (+1.4%)
packages/lib/dist/es/ru-RU.js 7.5 kB +95 B (+1.28%)
packages/lib/dist/es/sk-SK.js 6.47 kB +89 B (+1.4%)
packages/lib/dist/es/sl-SI.js 6 kB +74 B (+1.25%)
packages/lib/dist/es/sv-SE.js 5.68 kB +77 B (+1.37%)
packages/lib/dist/es/zh-CN.js 6.22 kB +82 B (+1.34%)
packages/lib/dist/es/zh-TW.js 6.32 kB +93 B (+1.49%)

compressed-size-action

set selected app only when needed
@longyulongyu longyulongyu changed the title [waiting for translation]feat: add Upi intent flow feat: add Upi intent flow May 8, 2024
@longyulongyu longyulongyu marked this pull request as ready for review May 8, 2024 14:29
…wait for the upi intent apps instead of redirect
@ribeiroguilherme ribeiroguilherme self-assigned this May 31, 2024
Copy link
Contributor

@ribeiroguilherme ribeiroguilherme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be working well. Looks good 💯

packages/lib/storybook/stories/components/UPI.stories.tsx Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Jun 3, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@longyulongyu longyulongyu merged commit 080f15b into main Jun 3, 2024
11 of 12 checks passed
@longyulongyu longyulongyu deleted the upi-intent-flow branch June 3, 2024 15:42
@github-actions github-actions bot mentioned this pull request Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants