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

chore: [IOBP-698] Add new mocked payment method of method management type REDIRECT #390

Merged
merged 6 commits into from
Jun 25, 2024

Conversation

Hantex9
Copy link
Contributor

@Hantex9 Hantex9 commented Jun 13, 2024

Short description

This PR adds a new mock in the payment methods available and not onboardable with the method management type REDIRECT

List of changes proposed in this pull request

  • Added a new item to the list of available payment methods

How to test

  • Start it with the payment flow in the IO app, you should be able to see a new payment method in the list (i.e. PostePay)

Copy link

codecov bot commented Jun 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.67%. Comparing base (33ca3dd) to head (13dd1c4).
Report is 5 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #390      +/-   ##
==========================================
+ Coverage   69.66%   69.67%   +0.01%     
==========================================
  Files         156      158       +2     
  Lines        5008     5023      +15     
  Branches      605      610       +5     
==========================================
+ Hits         3489     3500      +11     
+ Misses       1518     1445      -73     
- Partials        1       78      +77     
Files Coverage Δ
...rc/features/payments/persistence/paymentMethods.ts 90.00% <ø> (+0.52%) ⬆️
src/features/payments/routers/router.ts 100.00% <100.00%> (ø)

... and 26 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 92910c7...13dd1c4. Read the comment docs.

Hantex9 added a commit to pagopa/io-app that referenced this pull request Jun 19, 2024
…ling (#5860)

## Short description
This PR adds management of REDIRECT-type payment methods. If a payment
method is of type REDIRECT, during the generation of the authorization
request it must be passed as `detailType` to `redirect`.

## List of changes proposed in this pull request
- Added `REDIRECT` as a valid payment method
- Add the handling of the payment method management type in the
`handleWalletPaymentAuthorization` saga. If the method management is
REDIRECT, it means that we have to provide
`RedirectDetailTypeEnum.redirect` as `detailType` attribute

## How to test
- Checkout the dev-server from this PR:
pagopa/io-dev-api-server#390
- You should be able to see a new payment method (i.e. PostePay)
- Selecting that payment method, when you reach the authentication
request (when you're in the confirmation screen), you should check in
the request that `detailType` is `redirect`

## Preview


https://github.com/pagopa/io-app/assets/34343582/b4594d9b-5321-48d9-ad06-c1026e7162ce
Copy link
Contributor

@Vangaorth Vangaorth left a comment

Choose a reason for hiding this comment

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

LGTM

@Hantex9 Hantex9 merged commit 85d3b9d into master Jun 25, 2024
8 checks passed
Hantex9 added a commit to pagopa/io-app that referenced this pull request Jun 25, 2024
## Short description
This PR adds filtering by "status" within the methods saved during the
payment flow, showing only the methods that are enabled for payment.

## List of changes proposed in this pull request
- Added an additional selector that performs the filter by status

## How to test
- Run the dev-server with this PR
pagopa/io-dev-api-server#390
- Disable a payment method onboarded to be used for in-app purchases
going into its details.
- Start a new payment flow enabling the new payment section FF, you
shouldn't see the disabled payment method.

## Preview


https://github.com/pagopa/io-app/assets/34343582/a90e3ce4-aa06-4b59-b308-482715250c89

Co-authored-by: LazyAfternoons <[email protected]>
@Vangaorth Vangaorth deleted the IOBP-698-mock-redirect-method branch February 13, 2025 14:00
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