-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(router): Add external vault support in v1 payments flow #9274
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
…tch into add-external-vault-in-v1
…tch into add-external-vault-in-v1
| -- Your SQL goes here | ||
| ALTER TABLE business_profile | ||
| ADD COLUMN IF NOT EXISTS is_external_vault_enabled BOOLEAN; | ||
|
|
||
| ALTER TABLE business_profile | ||
| ADD COLUMN IF NOT EXISTS external_vault_connector_details JSONB; |
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.
we already have same migrations present in v2_compatible_migrations, instead of multiple instances is it possible to have a common migration between both @hrithikesh026
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.
yes, we already have v2.
but for v1 schema, v2_compatible_migrations wont be running. so its required to write under v1 migrations.
@sai-harsha-vardhan could you please help here
Sakilmostak
left a comment
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.
LGTM!
…tch into add-external-vault-in-v1
|
|
||
| let key_manager_state = &state.into(); | ||
|
|
||
| let merchant_connector_account_details = state |
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.
We need to abstract these out, we can do this later, normally itself bad to read these static data deeper in the floe
| @@ -0,0 +1,2 @@ | |||
| -- This file should undo anything in `up.sql` | |||
| ALTER TABLE payment_methods ADD COLUMN IF NOT EXISTS vault_type VARCHAR(16); No newline at end of file | |||
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.
this can be more like 64, can you merge query to single up and down sql files
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Type of Change
Description
Add external vault support in v1 payments flow.
Currently we only save card in hs-card-vault
Added new support to save card in external vault based merchant-profile configuration.
Changes in code -
During First CIT (fresh card for a customer c1 - setup future usage - on_session with customer acceptance)
During Repeat CIT (Saved card for a customer c1 - payment token for c1)
DB changes -
In business profile in api level & db level-
In Payment method table in db level (diesel model) -
Additional Changes
Motivation and Context
How did you test it?
external_vault_source - mca_lRJXlrSQ557zrIJUalxK (VGS mca id)
vault_type - external
external_vault_source -
vault_type - internal
Please note, test backward compatibility
how to -make a payment with existing customer's saved payment method
Checklist
cargo +nightly fmt --allcargo clippy