Conversation
9cc4c12 to
1e78c9d
Compare
b774157 to
159040a
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
3067516 to
50fa93e
Compare
5e02895 to
7fe4cd1
Compare
armanddidierjean
left a comment
There was a problem hiding this comment.
We could create a method that would allow to call either request_transaction or request_store_transfer. Maybe it could be a good idea to separate mypayment internal and public utils
| message = Message( | ||
| title=f"💸 Nouvelle demande de paiement - {request_info.name}", | ||
| content=f"Une nouvelle demande de paiement de {request_info.total / 100} € attend votre validation", | ||
| action_module=settings.school.payment_name, |
There was a problem hiding this comment.
This should be the module root
| message = Message( | ||
| title=f"💳 Paiement - {store.name}", | ||
| content=f"Une transaction de {transaction.total / 100} € a été effectuée", | ||
| action_module=settings.school.payment_name, |
| tot: Total amount of the transaction, in cents | ||
| iat: Generation datetime of the payment order | ||
| key: Id of the WalletDevice that generated the payment order, will be used to get the public key to verify the signature | ||
| store: If the payment is destined to a store |
There was a problem hiding this comment.
| store: If the payment is destined to a store | |
| store: If the payment is intended to be banked by a store or by an other user |
| name: str | ||
| note: str | None |
There was a problem hiding this comment.
Could we clarify a bit this part? Maybe store_note like in RequestEdit?
|
|
||
|
|
||
| async def request_store_transfer( | ||
| user: schemas_users.CoreUser, |
There was a problem hiding this comment.
You ask for both the user and the user_id in transfer_info
| """ | ||
| Create a transaction request for a user from a store. | ||
| """ |
There was a problem hiding this comment.
Could you make the docstring more explicit, stating what will happen:
- create a mypayment payment request between the user wallet and the store wallet
- the request need to be accepted be the user using ... endpoint
| user: schemas_users.CoreUser, | ||
| transfer_info: schemas_mypayment.StoreTransferInfo, | ||
| db: AsyncSession, | ||
| payment_tool: PaymentTool, |
There was a problem hiding this comment.
We need a specific PaymentTool of type mypayment. Letting the user pass its own payment_tool may lead to — hard to discover — issues.
I would suggest wrapping this method in a dependency that would ask for its own payment tool
Description
Please explain the changes you made here.
Checklist