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

[CHK-2736] feat(NPG): handle new fields from GET auth-data wallet api #475

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

Conversation

giovanniberti
Copy link
Contributor

@giovanniberti giovanniberti commented Apr 12, 2024

Big PR warning?

Most of the lines changed are either tests or indentation, while there are little changes to the actual business logic :)

List of Changes

  • handle new fields from wallet GET auth-data (in particular: last four digits for cards, masked email for PayPal)
  • refactor code handling payment session data

Motivation and Context

This PR is necessary to collect data needed to invoke Nodo's closePayment endpoint and fill with all the relevant data about a transaction.

How Has This Been Tested?

TODO

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Depends on #473
Depends on pagopa/pagopa-ecommerce-commons#192

Depends on pagopa/pagopa-infra#1925
Depends on pagopa/pagopa-wallet-service#132

Copy link

dpulls bot commented Apr 12, 2024

⚠️ Dpulls not installed on repository pagopa/pagopa-ecommerce-transactions-service. Checkout our quickstart for how to install.

@giovanniberti giovanniberti changed the base branch from main to CHK-2675-npg-mybank-validationServiceId April 12, 2024 08:46
pom.xml Outdated Show resolved Hide resolved
@giovanniberti giovanniberti force-pushed the CHK-2736-wallet-auth-data branch from 38ded35 to 86b034b Compare April 12, 2024 15:05
@giovanniberti giovanniberti changed the title [CHK-2736] feat(NPG): save POST notification validationServiceId field into events [CHK-2736] feat(NPG): handle new fields from GET auth-data wallet api Apr 13, 2024
Copy link

dpulls bot commented Apr 15, 2024

⚠️ Dpulls not installed on repository pagopa/pagopa-ecommerce-transactions-service. Checkout our quickstart for how to install.

pom.xml Outdated Show resolved Hide resolved
@giovanniberti giovanniberti marked this pull request as ready for review April 15, 2024 09:04
@giovanniberti giovanniberti requested a review from a team as a code owner April 15, 2024 09:04
Base automatically changed from CHK-2675-npg-mybank-validationServiceId to main April 18, 2024 08:30
@giovanniberti giovanniberti force-pushed the CHK-2736-wallet-auth-data branch from 407cd4f to af5780a Compare April 18, 2024 08:40
@giovanniberti giovanniberti force-pushed the CHK-2736-wallet-auth-data branch from af5780a to b294e94 Compare April 18, 2024 08:42
Copy link

dpulls bot commented Apr 18, 2024

⚠️ Dpulls not installed on repository pagopa/pagopa-ecommerce-transactions-service. Checkout our quickstart for how to install.

1 similar comment
Copy link

dpulls bot commented Apr 18, 2024

⚠️ Dpulls not installed on repository pagopa/pagopa-ecommerce-transactions-service. Checkout our quickstart for how to install.

@@ -346,7 +346,7 @@
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>https://raw.githubusercontent.com/pagopa/pagopa-infra/main/src/domains/wallet-app/api/payment-wallet-for-ecommerce/v1/_openapi.json.tpl</inputSpec>
<inputSpec>https://raw.githubusercontent.com/pagopa/pagopa-infra/CHK-2736-wallet-auth-data/src/domains/wallet-app/api/payment-wallet-for-ecommerce/v1/_openapi.json.tpl</inputSpec>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<inputSpec>https://raw.githubusercontent.com/pagopa/pagopa-infra/CHK-2736-wallet-auth-data/src/domains/wallet-app/api/payment-wallet-for-ecommerce/v1/_openapi.json.tpl</inputSpec>
<inputSpec>https://raw.githubusercontent.com/pagopa/pagopa-infra/main/src/domains/wallet-app/api/payment-wallet-for-ecommerce/v1/_openapi.json.tpl</inputSpec>

TODO: to be replaced after dependent pr merge

Copy link

dpulls bot commented May 3, 2024

🎉 All dependencies have been resolved !

Copy link

dpulls bot commented May 3, 2024

⚠️ Dpulls not installed on repository pagopa/pagopa-ecommerce-transactions-service. Checkout our quickstart for how to install.

2 similar comments
Copy link

dpulls bot commented May 3, 2024

⚠️ Dpulls not installed on repository pagopa/pagopa-ecommerce-transactions-service. Checkout our quickstart for how to install.

Copy link

dpulls bot commented May 3, 2024

⚠️ Dpulls not installed on repository pagopa/pagopa-ecommerce-transactions-service. Checkout our quickstart for how to install.

pietro-tota
pietro-tota previously approved these changes May 3, 2024
case PaymentSessionData.CardSessionData cardSessionData ->
cardSessionData.cardBin().value();
case PaymentSessionData.PgsCardSessionData cardSessionData -> cardSessionData.cardBin().value();
case PaymentSessionData.WalletCardSessionData cardSessionData ->
Copy link
Contributor

@pietro-tota pietro-tota May 3, 2024

Choose a reason for hiding this comment

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

WalletCardSessionData, CardSessionData and PgsCardSessionData could implement a common interface (let say CardData) with methods: cardBin(), brand() and other common fields so that were needed those switch cases can be collapsed to an if statement against the fact that PaymentSessionData is instance of the CardData interface.
What do you think?

pietro-tota
pietro-tota previously approved these changes May 8, 2024
Copy link

sonarqubecloud bot commented May 8, 2024

@giovanniberti giovanniberti force-pushed the CHK-2736-wallet-auth-data branch from 699f780 to 664b54b Compare May 16, 2024 09:02
pietro-tota
pietro-tota previously approved these changes May 16, 2024
@giovanniberti giovanniberti force-pushed the CHK-2736-wallet-auth-data branch from 4ccbdcb to 7d44711 Compare July 15, 2024 15:37
Copy link

This PR exceeds the recommended size of 400 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

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.

2 participants