-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(pm_auth): Added pm_auth_config to merchant_connector_account #2183
Conversation
This reverts commit 6dc3c9b.
|
||
pub pm_auth_config: Option<serde_json::Value>, |
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.
Could u plz add a doc comment. can be taken up in another PR
|
||
pub pm_auth_config: Option<serde_json::Value>, |
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.
Same here, doc comment
|
||
pub pm_auth_config: Option<serde_json::Value>, |
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.
Doc comment
@@ -682,6 +682,7 @@ pub async fn create_payment_connector( | |||
}, | |||
profile_id: Some(profile_id.clone()), | |||
applepay_verified_domains: None, | |||
pm_auth_config: req.pm_auth_config.clone(), |
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.
is this clone required?
Type of Change
Description
We will treat pm_auth services as connectors hence requiring a change in the MCA table.
The pm_auth will be of connector type = "payment_method_auth".
Additionally, a new column called pm_auth_config will relate MCA records to their respective chosen auth services, based on payment_method and pmt. Should be configured in dashboard.
VAS conjugate PR - https://github.com/juspay/hyperswitch-cloud/pull/2191
Updated VAS conjugate PR - https://github.com/juspay/hyperswitch-cloud/pull/2172
Additional Changes
Motivation and Context
How did you test it?
Configure a pm auth connector -
curl --location --request POST 'http://localhost:8080/account/sarthak1/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data-raw '{ "connector_type": "payment_method_auth", "connector_name": "plaid", "business_country": "US", "business_label": "default", "connector_account_details": { "auth_type": "BodyKey", "api_key": "some_key", "key1": "secret" }, "test_mode": false, "disabled": false }'
configure a PG connector with pm_auth_config provided -
curl --location --request POST 'http://localhost:8080/account/sarthak1/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data-raw '{ "connector_type": "fiz_operations", "connector_name": "stripe", "business_country": "US", "business_label": "default", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "some_key" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": [ "AmericanExpress", "DinersClub", "Discover", "JCB", "Mastercard", "Visa" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "accepted_currencies": { "type": "enable_only", "list": [ "CZK", "RON", "TRY", "USD", "GBP", "CAD", "AUD", "ARS", "CHF", "CNY", "DKK", "GHS", "JPY", "PLN", "NGN", "NOK", "KES", "SEK", "NZD", "ZAR", "SGD", "INR" ] } }, { "payment_method_type": "debit", "card_networks": [ "AmericanExpress", "DinersClub", "Discover", "JCB", "Mastercard", "Visa" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "accepted_currencies": { "type": "enable_only", "list": [ "CZK", "RON", "TRY", "USD", "GBP", "CAD", "AUD", "ARS", "CHF", "CNY", "DKK", "GHS", "JPY", "PLN", "NGN", "NOK", "KES", "SEK", "NZD", "ZAR", "SGD", "INR" ] } }, { "payment_method_type": "credit", "card_networks": [ "Mastercard", "Visa" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "accepted_currencies": { "type": "enable_only", "list": [ "EUR" ] } }, { "payment_method_type": "debit", "card_networks": [ "Mastercard", "Visa" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "accepted_currencies": { "type": "enable_only", "list": [ "EUR" ] } } ] }, { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "eps", "recurring_enabled": true, "installment_payment_enabled": true, "accepted_currencies": { "type": "enable_only", "list": [ "EUR" ] } }, { "payment_method_type": "giropay", "recurring_enabled": true, "installment_payment_enabled": true, "accepted_currencies": { "type": "enable_only", "list": [ "EUR" ] } }, { "payment_method_type": "ideal", "recurring_enabled": true, "installment_payment_enabled": true, "accepted_currencies": { "type": "enable_only", "list": [ "EUR" ] } } ] }, { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "apple_pay", "payment_experience": "invoke_sdk_client", "card_networks": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "accepted_currencies": { "type": "enable_only", "list": [ "USD", "GBP", "CAD", "AUD", "EUR" ] } } ] } ], "metadata": { "city": "NY", "unit": "245" }, "pm_auth_config": { "pm_auth_configs": [ { "payment_method": "card", "payment_method_type": "credit", "auth_service": "plaid_US_default" } ] } }'
Checklist
cargo +nightly fmt --all
cargo clippy