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

[wip]Use expiresAt for QR payments #2520

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

longyulongyu
Copy link
Contributor

@longyulongyu longyulongyu commented Jan 16, 2024

Summary

For the following QR based payments - bcmc_mobile, duitnow, payme, paynow, pix, promptpay, swish and wechatpayQR, we improved how we calculate the countdown time.

Specifically, we calculate the QR countdown time based on the expiresAt timestamp from the /payments response if it is returned in the action object, otherwise we use merchant's frontend configuration.
If both are not presented, we fall back to the default value.

Tested scenarios

Added tests and all unit tests passed.
Tested on my device with different timezones, the wechat QR pay shows a 30mins count down (taking the value from expiresAt)

Internal ticket: COWEB-1258

Copy link

changeset-bot bot commented Jan 16, 2024

🦋 Changeset detected

Latest commit: 957d507

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

Size Change: +875 B (0%)

Total Size: 1.12 MB

Filename Size Change
packages/lib/dist/adyen.js 297 kB +213 B (0%)
packages/lib/dist/cjs/index.js 257 kB +237 B (0%)
packages/lib/dist/es.modern/index.js 121 kB +219 B (0%)
packages/lib/dist/es/index.js 141 kB +206 B (0%)
ℹ️ View Unchanged
Filename Size
packages/lib/dist/es.modern/ar.js 6.92 kB
packages/lib/dist/es.modern/cs-CZ.js 6.17 kB
packages/lib/dist/es.modern/da-DK.js 5.6 kB
packages/lib/dist/es.modern/de-DE.js 6.07 kB
packages/lib/dist/es.modern/el-GR.js 7.88 kB
packages/lib/dist/es.modern/es-ES.js 5.7 kB
packages/lib/dist/es.modern/fi-FI.js 5.71 kB
packages/lib/dist/es.modern/fr-FR.js 5.94 kB
packages/lib/dist/es.modern/hr-HR.js 5.97 kB
packages/lib/dist/es.modern/hu-HU.js 6.25 kB
packages/lib/dist/es.modern/it-IT.js 5.79 kB
packages/lib/dist/es.modern/ja-JP.js 6.67 kB
packages/lib/dist/es.modern/ko-KR.js 6.29 kB
packages/lib/dist/es.modern/nl-NL.js 5.73 kB
packages/lib/dist/es.modern/no-NO.js 5.56 kB
packages/lib/dist/es.modern/pl-PL.js 6.25 kB
packages/lib/dist/es.modern/pt-BR.js 5.76 kB
packages/lib/dist/es.modern/pt-PT.js 5.88 kB
packages/lib/dist/es.modern/ro-RO.js 6.02 kB
packages/lib/dist/es.modern/ru-RU.js 7.36 kB
packages/lib/dist/es.modern/sk-SK.js 6.34 kB
packages/lib/dist/es.modern/sl-SI.js 5.88 kB
packages/lib/dist/es.modern/sv-SE.js 5.57 kB
packages/lib/dist/es.modern/zh-CN.js 6.11 kB
packages/lib/dist/es.modern/zh-TW.js 6.2 kB
packages/lib/dist/es/ar.js 6.92 kB
packages/lib/dist/es/cs-CZ.js 6.17 kB
packages/lib/dist/es/da-DK.js 5.6 kB
packages/lib/dist/es/de-DE.js 6.07 kB
packages/lib/dist/es/el-GR.js 7.88 kB
packages/lib/dist/es/es-ES.js 5.7 kB
packages/lib/dist/es/fi-FI.js 5.71 kB
packages/lib/dist/es/fr-FR.js 5.94 kB
packages/lib/dist/es/hr-HR.js 5.97 kB
packages/lib/dist/es/hu-HU.js 6.25 kB
packages/lib/dist/es/it-IT.js 5.79 kB
packages/lib/dist/es/ja-JP.js 6.67 kB
packages/lib/dist/es/ko-KR.js 6.29 kB
packages/lib/dist/es/nl-NL.js 5.73 kB
packages/lib/dist/es/no-NO.js 5.56 kB
packages/lib/dist/es/pl-PL.js 6.25 kB
packages/lib/dist/es/pt-BR.js 5.76 kB
packages/lib/dist/es/pt-PT.js 5.88 kB
packages/lib/dist/es/ro-RO.js 6.02 kB
packages/lib/dist/es/ru-RU.js 7.36 kB
packages/lib/dist/es/sk-SK.js 6.34 kB
packages/lib/dist/es/sl-SI.js 5.88 kB
packages/lib/dist/es/sv-SE.js 5.57 kB
packages/lib/dist/es/zh-CN.js 6.11 kB
packages/lib/dist/es/zh-TW.js 6.2 kB

compressed-size-action

Copy link

sonarcloud bot commented Jan 16, 2024

@longyulongyu longyulongyu marked this pull request as draft January 22, 2024 10:04
@longyulongyu longyulongyu changed the title Use expiresAt for QR payments [wip]Use expiresAt for QR payments Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant