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

Adds ANCV payment method component #2293

Merged
merged 16 commits into from
Oct 11, 2023
Merged

Adds ANCV payment method component #2293

merged 16 commits into from
Oct 11, 2023

Conversation

m1aw
Copy link
Contributor

@m1aw m1aw commented Aug 10, 2023

Summary

This adds support for ANCV voucher await component.

This component is a mix between an await component with a gift card (partial payment method).

Payment flow is like follows:

  1. user inserts 11-digit id or email address corresponding to their ANCV account
  2. a order is created (no balance check is made contrary to gift card)
  3. payments call is made with the order details and full amount
  4. we get a await response from payments, and render the await component
  5. we get PartiallyAuthorised in result code from status and request paymentDetails receiving an order
  6. after this we should behave like giftcard and show dropin again or call the relevant callbacks

The main problems with this current PR is the code duplication. Big parts of the code have been ported from giftcard without a good way to extracting the logic.

Also there's currently missing code coverage.

Tested scenarios

Fixed issue:

};
}

private onOrderRequest = data => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This logic should be move elsewhere.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 10, 2023

Size Change: +10.3 kB (+1%)

Total Size: 1.08 MB

Filename Size Change
packages/lib/dist/adyen.js 286 kB +2.43 kB (+1%)
packages/lib/dist/cjs/index.js 247 kB +2.51 kB (+1%)
packages/lib/dist/es.modern/ar.js 6.54 kB +122 B (+2%)
packages/lib/dist/es.modern/cs-CZ.js 5.81 kB +17 B (0%)
packages/lib/dist/es.modern/da-DK.js 5.29 kB +19 B (0%)
packages/lib/dist/es.modern/de-DE.js 5.7 kB +39 B (+1%)
packages/lib/dist/es.modern/el-GR.js 7.44 kB +148 B (+2%)
packages/lib/dist/es.modern/es-ES.js 5.37 kB +9 B (0%)
packages/lib/dist/es.modern/fi-FI.js 5.38 kB +28 B (+1%)
packages/lib/dist/es.modern/fr-FR.js 5.56 kB +91 B (+2%)
packages/lib/dist/es.modern/hr-HR.js 5.61 kB +113 B (+2%)
packages/lib/dist/es.modern/hu-HU.js 5.86 kB +82 B (+1%)
packages/lib/dist/es.modern/index.js 119 kB +590 B (0%)
packages/lib/dist/es.modern/it-IT.js 5.44 kB +101 B (+2%)
packages/lib/dist/es.modern/ja-JP.js 6.27 kB +91 B (+1%)
packages/lib/dist/es.modern/ko-KR.js 5.91 kB +126 B (+2%)
packages/lib/dist/es.modern/nl-NL.js 5.4 kB +31 B (+1%)
packages/lib/dist/es.modern/no-NO.js 5.27 kB +17 B (0%)
packages/lib/dist/es.modern/pl-PL.js 5.87 kB +110 B (+2%)
packages/lib/dist/es.modern/pt-BR.js 5.43 kB +107 B (+2%)
packages/lib/dist/es.modern/pt-PT.js 5.55 kB +99 B (+2%)
packages/lib/dist/es.modern/ro-RO.js 5.68 kB +109 B (+2%)
packages/lib/dist/es.modern/ru-RU.js 6.89 kB +133 B (+2%)
packages/lib/dist/es.modern/sk-SK.js 5.97 kB +122 B (+2%)
packages/lib/dist/es.modern/sl-SI.js 5.52 kB +88 B (+2%)
packages/lib/dist/es.modern/sv-SE.js 5.23 kB +4 B (0%)
packages/lib/dist/es.modern/zh-CN.js 5.72 kB +100 B (+2%)
packages/lib/dist/es.modern/zh-TW.js 5.86 kB +120 B (+2%)
packages/lib/dist/es/ar.js 6.54 kB +122 B (+2%)
packages/lib/dist/es/cs-CZ.js 5.81 kB +17 B (0%)
packages/lib/dist/es/da-DK.js 5.29 kB +19 B (0%)
packages/lib/dist/es/de-DE.js 5.7 kB +39 B (+1%)
packages/lib/dist/es/el-GR.js 7.44 kB +148 B (+2%)
packages/lib/dist/es/es-ES.js 5.37 kB +9 B (0%)
packages/lib/dist/es/fi-FI.js 5.38 kB +28 B (+1%)
packages/lib/dist/es/fr-FR.js 5.56 kB +91 B (+2%)
packages/lib/dist/es/hr-HR.js 5.61 kB +113 B (+2%)
packages/lib/dist/es/hu-HU.js 5.86 kB +82 B (+1%)
packages/lib/dist/es/index.js 139 kB +745 B (+1%)
packages/lib/dist/es/it-IT.js 5.44 kB +101 B (+2%)
packages/lib/dist/es/ja-JP.js 6.27 kB +91 B (+1%)
packages/lib/dist/es/ko-KR.js 5.91 kB +126 B (+2%)
packages/lib/dist/es/nl-NL.js 5.4 kB +31 B (+1%)
packages/lib/dist/es/no-NO.js 5.27 kB +17 B (0%)
packages/lib/dist/es/pl-PL.js 5.87 kB +110 B (+2%)
packages/lib/dist/es/pt-BR.js 5.43 kB +107 B (+2%)
packages/lib/dist/es/pt-PT.js 5.55 kB +99 B (+2%)
packages/lib/dist/es/ro-RO.js 5.68 kB +109 B (+2%)
packages/lib/dist/es/ru-RU.js 6.89 kB +133 B (+2%)
packages/lib/dist/es/sk-SK.js 5.97 kB +122 B (+2%)
packages/lib/dist/es/sl-SI.js 5.52 kB +88 B (+2%)
packages/lib/dist/es/sv-SE.js 5.23 kB +4 B (0%)
packages/lib/dist/es/zh-CN.js 5.72 kB +100 B (+2%)
packages/lib/dist/es/zh-TW.js 5.86 kB +120 B (+2%)

compressed-size-action

@sonarcloud
Copy link

sonarcloud bot commented Aug 10, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

12.5% 12.5% Coverage
23.7% 23.7% Duplication

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

@changeset-bot
Copy link

changeset-bot bot commented Sep 26, 2023

🦋 Changeset detected

Latest commit: fe2766f

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

@m1aw m1aw marked this pull request as ready for review September 28, 2023 15:51
@sponglord
Copy link
Contributor

Just wanted to confirm this is also working on sessions?

@sponglord
Copy link
Contributor

Don't forget to add a .changeset file

@m1aw m1aw changed the title Feature/ancv component Adds ANCV payment method component Oct 11, 2023
@m1aw m1aw merged commit cb1564c into main Oct 11, 2023
9 checks passed
@m1aw m1aw deleted the feature/ancv-component branch October 11, 2023 08:23
@github-actions github-actions bot mentioned this pull request Oct 11, 2023
@sonarcloud
Copy link

sonarcloud bot commented Oct 11, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 2 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

11.3% 11.3% Coverage
17.2% 17.2% Duplication

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

@theghostbel
Copy link

Asked in PR view, but will repeat here as well:
Is removal of Trstly-related translations expected?
https://github.com/Adyen/adyen-web/pull/2293/files#diff-396d6e3eb5952c0eb94623a25a7cf75f8ca5e186a2b0d5d8609c3673f1e6ebfbL293

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.

3 participants