Skip to content

INIT integration: define InitConfig model #4046

Description

@angela-tran

As previously alluded to in #4010 (comment), we need a model to store the details for connecting to Collect.js for tokenization and to MOBILEvario for registration.

For Collect.js. we know we need:

  • a URL to the script, which can be used for any agency and environment
  • an API key, which is agency-specific and environment-specific

For MOBILEvario, we know we need:

  • a base API URL, which is agency/region-specific and environment-specific
  • the header value for Basic HTTP Authentication, which is also agency/region-specific (as a function of it being specific to an API instance) and environment-specific

The definition of InitConfig should take all that into consideration and use patterns from LittlepayConfig and SwitchioConfig. It should also define its own ModelAdmin subclass and honor the same add/change/delete/view permissions as the LittlepayConfig/SwitchioConfig models.

Acceptance Criteria

  • InitConfig model is defined with respect to the details listed above
  • InitConfig models can be created / deleted / viewed / changed in Benefits Administrator with the expected permissions respected for our user types of superuser, Cal-ITP staff user, and transit agency staff user
  • Sample fixtures updated
  • Shared LastPass fixtures updated

Additional context

This is all based on our conversations with the INIT team in the context of implementing this for PSTA and their riders. We understand that other agencies that use INIT may not use Collect.js for tokenization and that the MOBILEvario API instances for those agencies may use different mechanisms for authentication. We recognize that the InitConfig we define in this task may not work as-is for the next INIT integration, and that is ok.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

back-endDjango views, sessions, middleware, models, migrations etc.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions