-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(core): Add cardbrand union fetch logic for click to pay session response #7858
Conversation
Changed Files
|
…-fetching-connectors-based-on-ctp-eligible' of https://github.com/juspay/hyperswitch into 9296-feature-add-card-brands-to-ctp-session-response-by-fetching-connectors-based-on-ctp-eligible
…-fetching-connectors-based-on-ctp-eligible' of https://github.com/juspay/hyperswitch into 9296-feature-add-card-brands-to-ctp-session-response-by-fetching-connectors-based-on-ctp-eligible
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.
Config changes look good
6cce780
@@ -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")] |
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.
there's already a deserializer for this type, deserialize_hashset
, is it possible to use that?
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.
the requirement is little different here, the one you mentioning goes something like bank_debit.ach = { connector_list = "gocardless,adyen" }
where as mine is click_to_pay = {connector_list = "adyen, cybersource"}
4fffef8
…response (#7858) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Sahkal Poddar <[email protected]>
Type of Change
Description
Add cardbrand union fetch logic for click to pay session response
Previously for click to pay card brands was needed to be configured via dashboard in click to pay connector create tab, with this change we will provide card brands as a union of all card networks under active payment processor
How did you test it?
Create Payment connectors that supports click to pay
Lets take the example of adyen and cybersource
in adyen configure card network as ["Visa", "Mastercard"]
and in cybersource configure card network as ["American_Express"]
CYBERSOURCE
CTP_MASTERCARD
update business profile
Create a payment
do session call
Response
card brands should contain union of card brands supported via both cybersource and adyen
Checklist
cargo +nightly fmt --all
cargo clippy