Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented Oct 30, 2023

What do these changes do?

Implements payment-methods logic in the payments service. The logic has been basically copied and adapted from that existing in the webserver.payments plugin. Nonetheless, the code in the webserver will still fake the payment-method until app-motion's app-gateway fully implements the payment-method infrastructure (https://github.com/ITISFoundation/appmotion-exchange/issues/11)

Highlights

payments

  • db/payments_methods_repo: implemented a repository layer for payment-methods
  • api/rest/_acknowledgements : implemented the rest interface to ACK payment-methods
  • api/rpc/_payments_methods : implements rpc interface for payment-methods exposed to the web-server
  • services/payments_gateway : implements the http client calls to the payment-gateway API for payment-methods
  • ♻️ minor models rename, tests etc

Related issue/s

How to test

Driving tests

cd services/payments
make install-dev
pytest -vv tests/unit

DevOps

  • None

@pcrespov pcrespov self-assigned this Oct 30, 2023
@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Merging #4953 (e41d48a) into master (46c1253) will decrease coverage by 4.2%.
The diff coverage is 83.3%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #4953     +/-   ##
========================================
- Coverage    83.3%   79.1%   -4.2%     
========================================
  Files        1214    1020    -194     
  Lines       50379   42655   -7724     
  Branches     1076     836    -240     
========================================
- Hits        41968   33745   -8223     
- Misses       8184    8726    +542     
+ Partials      227     184     -43     
Flag Coverage Δ
integrationtests 65.1% <16.6%> (?)
unittests 79.0% <83.3%> (-4.4%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...simcore_service_webserver/payments/_methods_api.py 100.0% <100.0%> (ø)
...simcore_service_webserver/payments/_onetime_api.py 100.0% <100.0%> (ø)
...re_service_webserver/wallets/_payments_handlers.py 99.1% <100.0%> (ø)
...ver/src/simcore_service_webserver/payments/_rpc.py 81.2% <50.0%> (ø)

... and 424 files with indirect coverage changes

@pcrespov pcrespov force-pushed the is4751/move-payment-methods-to-service branch from 8a39536 to 01676aa Compare October 30, 2023 19:38
@pcrespov pcrespov force-pushed the is4751/move-payment-methods-to-service branch from 7188c16 to 1d00a70 Compare October 31, 2023 21:04
@pcrespov pcrespov changed the title WIP: 🎨 Is4751/move payment methods to service 🎨 Payments-methods logic in payments service Oct 31, 2023
@pcrespov pcrespov added this to the Microhistory milestone Oct 31, 2023
@pcrespov pcrespov added the a:payments area: payments service label Oct 31, 2023
@pcrespov pcrespov marked this pull request as ready for review October 31, 2023 21:27
Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

this is looking good. I am not sure I understand how you distringuish between log.debug messages, todos and fixme though.

Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

👍

@pcrespov pcrespov force-pushed the is4751/move-payment-methods-to-service branch from 4080303 to caf34b8 Compare November 1, 2023 13:41
Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

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

Nice! Looks good to me

@pcrespov pcrespov force-pushed the is4751/move-payment-methods-to-service branch from b621fb4 to e41d48a Compare November 1, 2023 19:36
@pcrespov pcrespov enabled auto-merge (squash) November 1, 2023 19:36
@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit e41d48a and detected 0 issues on this pull request.

View more on Code Climate.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
0.5% 0.5% Duplication

Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

🥇

@pcrespov pcrespov merged commit 5a1d735 into ITISFoundation:master Nov 1, 2023
@pcrespov pcrespov deleted the is4751/move-payment-methods-to-service branch November 1, 2023 22:05
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Nov 23, 2023
29 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:payments area: payments service

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants