-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
refactor(pm_list): Update required fields for a payment method #1720
Conversation
field_type: enums::FieldType::UserCountry { | ||
options: vec!["US".to_string(), "IN".to_string()], | ||
field_type: enums::FieldType::UserAddressCountry { | ||
options: vec![], |
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.
should be ALL
or some country name right?
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.
Here, it is left empty because SDK will take care of countries list if not mentioned. (Discussed with SDK team)
@@ -1047,7 +1138,7 @@ impl Default for super::settings::RequiredFields { | |||
( | |||
enums::Connector::Adyen, | |||
vec![RequiredFieldInfo { | |||
required_field: "card_holder_name".to_string(), | |||
required_field: "payment_method_data.bank_debit.ach_bank_debit.card_holder_name".to_string(), |
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 needs to be generalized, cannot keep using card_holder_name
for all the payment methods which are not related to cards.
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.
Other than that, looks good to me!
RequiredFieldInfo { | ||
required_field: "billing.address.line1".to_string(), | ||
display_name: "line1".to_string(), | ||
field_type: enums::FieldType::UserAddressline1, |
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 might have to consider renaming this and UserAddressline2
to UserAddressLine1
and UserAddressLine2
instead. This can be taken up in a separate PR.
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.
So this naming was given by sdk, so did the same, will ask them and modify them in next pr
8d4176e
Type of Change
Description
Refactored required fields for a payment method and removed fields not collected by sdk such as description, browser info.
Additional Changes
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy