-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Frm integration with hyperswitch #857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…or frm_configs using match
| pub payment_methods_enabled: Option<Vec<serde_json::Value>>, | ||
| pub connector_type: storage_enums::ConnectorType, | ||
| pub metadata: Option<pii::SecretSerdeValue>, | ||
| pub frm_configs: Option<Secret<serde_json::Value>>, //Option<FrmConfigs> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @rishavkar, I understand this is a PR that's already merged, but wanted to bring this to your attention.
Whenever you're adding fields to a struct corresponding to a database table, please add it at the last, so that it is in correspondence with how the database has it. When we do a diesel migration run, Postgres adds the column to the end of the table, and diesel updates the schema.rs file to match the database table state, thus adding frm_configs to the end. Because of how diesel handles queries, it expects the column order in schema.rs and the field order in the struct here to be the same. If that is not the case, we'd end up having unexpected behavior (such as data for one column being populated in another) when running our application.
Type of Change
Description
We need to accept frm_configs from the dashboard. So needed to do development for accepting new fields for endpoint: /account/:account_id/connectors
Additional Changes
ALTER TABLE "merchant_connector_account" ADD COLUMN frm_configs jsonb;Motivation and Context
It a new feature...we are going to integrate FRM services into hyperswitch, for which we required additional fields for create connector request.
This PR will accept frm_configs field for create connector request, and accordingly persist in the db.
How did you test it?
Following are the steps:
Checklist
cargo +nightly fmt --allcargo clippyAssignee