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
When we first implemented enrollment expiration logic in #1989, the only way to check if the user (funding source) was already linked to a group was to look up all funding sources linked to the group, and check if the user's funding source was in the that list. Over time with increasing enrollments, this won't scale as every single funding source will have to be checked each time.
Now Littlepay offers an endpoint to look up the groups linked to a given funding source, i.e. the inverse relationship. See cal-itp/littlepay#60.
This will be a much shorter list to check -- empty for new users (funding sources), and perhaps one or two and not many more for existing users.
Acceptance Criteria
During enrollment:
Instead of looking up funding sources for the group, look up groups for the funding source
The user is considered already enrolled if the current eligibility's group is in the list
thekaveman
changed the title
Refactor current enrollment check to check groups for funding source
Refactor enrollment check to lookup groups for funding source
May 1, 2024
I tested out calling the endpoint implemented in cal-itp/littlepay#60 against the MST QA and prod Littlepay environments.
The endpoint returns a 404 status even though I'm giving it a funding source ID that I know is in a group (I can see it when I look up the funding sources for the group).
When we first implemented enrollment expiration logic in #1989, the only way to check if the user (funding source) was already linked to a group was to look up all funding sources linked to the group, and check if the user's funding source was in the that list. Over time with increasing enrollments, this won't scale as every single funding source will have to be checked each time.
Now Littlepay offers an endpoint to look up the groups linked to a given funding source, i.e. the inverse relationship. See cal-itp/littlepay#60.
This will be a much shorter list to check -- empty for new users (funding sources), and perhaps one or two and not many more for existing users.
Acceptance Criteria
During enrollment:
Additional context
Depends on cal-itp/littlepay#60.
This will be a refactor of the the work that comes back (but may be modified) with #2062.
The text was updated successfully, but these errors were encountered: