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: [IOBP-687,IOBP-885] Add recently used payment method from the payment flow #6234

Merged
merged 27 commits into from
Oct 14, 2024

Conversation

Hantex9
Copy link
Contributor

@Hantex9 Hantex9 commented Oct 3, 2024

Short description

This PR implements the ability to display the most recently used payment method during in-app payments, ensuring it matches the method used in a previous transaction.

List of changes proposed in this pull request

  • Updated the open API definitions;
  • Added saga, action & reducer about the recentUsedPaymentMethod
  • Added an additional list item at the top of the list that contains the most recently used payment method if available, otherwise it isn't showed
  • Added a logic to remove the recently used payment method from the cluster membership

How to test

  • Checkout this PR: feat: [IOBP-687,IOBP-886] Add the recent used payment method when the user pays io-dev-api-server#415 from the io-dev-api-server and generate the API definitions;
  • Start the io-dev-api-server;
  • With the app in local env, start a payment flow from the "Payments" section screen tapping the CTA "Paga un avviso"
  • Then tap on the CTA "Digita"
    • Inside of it, type any notice code -> go forward and type any fiscal code;
  • After, you should be able to see a list of available payment method, complete the first payment choosing any payment method;
  • When you complete the transaction, try to start another payment flow, you should be able to see the payment method previously you choose in the "Recently used" section;

Preview

preview.mov

@Hantex9 Hantex9 added the IO-Bonus e pagamenti IO - Bonus e pagamenti label Oct 3, 2024
@Hantex9 Hantex9 requested a review from a team as a code owner October 3, 2024 10:07
@Hantex9 Hantex9 changed the title feat: [IOBP-687,IOBP-885] add last payment used feat: [IOBP-687,IOBP-885] Add recently used payment method from the payment flow Oct 3, 2024
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Oct 3, 2024

Warnings
⚠️

Multiple stories with different types are associated with this Pull request.
Only one tag will be added, following the order: feature > bug > chore

Affected stories

  • 🌟 IOBP-687: [Improvement] Pre-selezione ultimo metodo utilizzato anche per metodi non on-boardati
    subtask of
    • IOBP-802: [Stella polare] Integrazione IO-ecommerce PagoPA (Flusso pagamento "definitivo")
  • ⚙️ IOBP-885: [FE] Implementazione logica per pre-selezione ultimo metodo utilizzato
    subtask of
    • 🌟 IOBP-687: [Improvement] Pre-selezione ultimo metodo utilizzato anche per metodi non on-boardati

Generated by 🚫 dangerJS against 4f72f6c

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

Attention: Patch coverage is 3.92157% with 49 lines in your changes missing coverage. Please review.

Project coverage is 47.10%. Comparing base (4f204b4) to head (4f72f6c).
Report is 586 commits behind head on master.

Files with missing lines Patch % Lines
...checkout/components/CheckoutPaymentMethodsList.tsx 0.00% 19 Missing ⚠️
...a/networking/handleWalletPaymentGetRecentMethod.ts 0.00% 12 Missing ⚠️
...ayments/checkout/store/selectors/paymentMethods.ts 10.00% 9 Missing ⚠️
...features/payments/checkout/store/reducers/index.ts 0.00% 6 Missing ⚠️
...checkout/screens/WalletPaymentPickMethodScreen.tsx 0.00% 2 Missing ⚠️
ts/features/payments/checkout/saga/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6234      +/-   ##
==========================================
- Coverage   48.42%   47.10%   -1.33%     
==========================================
  Files        1488     1792     +304     
  Lines       31617    36165    +4548     
  Branches     7669     8685    +1016     
==========================================
+ Hits        15311    17036    +1725     
- Misses      16238    19063    +2825     
+ Partials       68       66       -2     
Files with missing lines Coverage Δ
...ures/payments/checkout/store/actions/networking.ts 100.00% <100.00%> (ø)
ts/features/payments/checkout/utils/index.ts 34.37% <ø> (-65.63%) ⬇️
ts/features/payments/checkout/saga/index.ts 0.00% <0.00%> (ø)
...checkout/screens/WalletPaymentPickMethodScreen.tsx 1.25% <0.00%> (-5.06%) ⬇️
...features/payments/checkout/store/reducers/index.ts 14.47% <0.00%> (-1.25%) ⬇️
...ayments/checkout/store/selectors/paymentMethods.ts 21.81% <10.00%> (ø)
...a/networking/handleWalletPaymentGetRecentMethod.ts 0.00% <0.00%> (ø)
...checkout/components/CheckoutPaymentMethodsList.tsx 4.49% <0.00%> (ø)

... and 1398 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7fe89b8...4f72f6c. Read the comment docs.

Copy link
Contributor

@hevelius hevelius left a comment

Choose a reason for hiding this comment

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

Radio on PAYMENT_CHECKOUT_MAKE not works

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-10-13.at.20.16.57.mp4

@Hantex9
Copy link
Contributor Author

Hantex9 commented Oct 14, 2024

Radio on PAYMENT_CHECKOUT_MAKE not works

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-10-13.at.20.16.57.mp4

Thank you for pointing it out! Fixed in the following commit: 589a486

@Hantex9 Hantex9 requested a review from hevelius October 14, 2024 08:15
@Hantex9 Hantex9 merged commit a081ed4 into master Oct 14, 2024
13 checks passed
@Hantex9 Hantex9 deleted the IOBP-885-add-last-payment-used branch October 14, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO-Bonus e pagamenti IO - Bonus e pagamenti
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants