You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problematic behavior
It's currently not possible to register the same credit card for multiple accounts or users.
This is problematic in the following use cases:
An organization wants to pay on behalf of multiple members
A user creates a new account and wants to pay with a previously used card
The issue is technical: there is a uniqueness constraint on a field in the credit card model (the token sent by Payzen), which currently prevents us from saving the same card multiple times in the database.
Expected behavior/code
Allow saving the same credit card multiple times in the database.
Environment
Joanie version: 2.11.0
Possible Solution
Remove the uniqueness constraint on the token field and replace it with a constraint at the user level. Before implementing this change, we need to assess the impact of this new behavior.
If multiple users want to use the same credit card, there will be as many credit card entries as users in the database.
In pre-production, the same Lyra test cards can be used by different users. Perhaps understanding why they are successfully saved in the database could help resolve this issue?
Bug Report
Problematic behavior
It's currently not possible to register the same credit card for multiple accounts or users.
This is problematic in the following use cases:
The issue is technical: there is a uniqueness constraint on a field in the credit card model (the token sent by Payzen), which currently prevents us from saving the same card multiple times in the database.
Expected behavior/code
Allow saving the same credit card multiple times in the database.
Environment
Possible Solution
Remove the uniqueness constraint on the token field and replace it with a constraint at the user level. Before implementing this change, we need to assess the impact of this new behavior.
If multiple users want to use the same credit card, there will be as many credit card entries as users in the database.
In pre-production, the same Lyra test cards can be used by different users. Perhaps understanding why they are successfully saved in the database could help resolve this issue?
Additional context/Screenshots
The text was updated successfully, but these errors were encountered: