-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(core): Add cardbrand union fetch logic for click to pay session response #7858
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
Changes from 11 commits
057edfa
0ef88fc
7fb7764
bfddf8b
05109f6
ea85e8d
07ceab3
cb46b9f
3cc07ae
29b1e60
6cce780
4fffef8
95cb249
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -145,6 +145,7 @@ pub struct Settings<S: SecretState> { | |
| pub network_tokenization_supported_connectors: NetworkTokenizationSupportedConnectors, | ||
| pub theme: ThemeSettings, | ||
| pub platform: Platform, | ||
| pub authentication_providers: AuthenticationProviders, | ||
| pub open_router: OpenRouter, | ||
| } | ||
|
|
||
|
|
@@ -508,6 +509,31 @@ pub struct CorsSettings { | |
| pub allowed_methods: HashSet<String>, | ||
| } | ||
|
|
||
| #[derive(Debug, Deserialize, Clone, Default)] | ||
| pub struct AuthenticationProviders { | ||
| #[serde(deserialize_with = "deserialize_connector_list")] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there's already a deserializer for this type,
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the requirement is little different here, the one you mentioning goes something like |
||
| pub click_to_pay: HashSet<enums::Connector>, | ||
| } | ||
|
|
||
| fn deserialize_connector_list<'a, D>(deserializer: D) -> Result<HashSet<enums::Connector>, D::Error> | ||
| where | ||
| D: serde::Deserializer<'a>, | ||
| { | ||
| use serde::de::Error; | ||
|
|
||
| #[derive(Deserialize)] | ||
| struct Wrapper { | ||
| connector_list: String, | ||
| } | ||
|
|
||
| let wrapper = Wrapper::deserialize(deserializer)?; | ||
| wrapper | ||
| .connector_list | ||
| .split(',') | ||
| .map(|s| s.trim().parse().map_err(D::Error::custom)) | ||
| .collect() | ||
| } | ||
|
|
||
| #[derive(Debug, Deserialize, Clone, Default)] | ||
| pub struct NetworkTransactionIdSupportedConnectors { | ||
| #[serde(deserialize_with = "deserialize_hashset")] | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.