-
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(payments): [Payment links] add hide card nickname field config for secure payment links #6554
Conversation
Changed Files
|
@@ -7,8 +7,8 @@ use api_models::{ | |||
use common_utils::{ | |||
consts::{ | |||
DEFAULT_ALLOWED_DOMAINS, DEFAULT_BACKGROUND_COLOR, DEFAULT_DISPLAY_SDK_ONLY, | |||
DEFAULT_ENABLE_SAVED_PAYMENT_METHOD, DEFAULT_LOCALE, DEFAULT_MERCHANT_LOGO, | |||
DEFAULT_PRODUCT_IMG, DEFAULT_SDK_LAYOUT, DEFAULT_SESSION_EXPIRY, | |||
DEFAULT_ENABLE_SAVED_PAYMENT_METHOD, DEFAULT_HIDE_CARD_NICKNAME_FIELD, DEFAULT_LOCALE, |
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.
Nit:
If some (or all) of these constants are not being used outside of the router
crate, I'd prefer moving them all to the router
crate itself.
@@ -56,6 +56,7 @@ function initializeSDK() { | |||
height: 55, | |||
}, | |||
}, | |||
hideCardNicknameField: false, |
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.
Why not use what was configured in the payment link config?
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.
Since displaySavedPaymentMethodsCheckbox is set to false for open payment links, it doesn't matter whether we hide the card nick name field or not. So i mapped it to it's default value in SDK, which is false.
Type of Change
Description
Add hide card nickname field config for secure payment links. https://docs.hyperswitch.io/explore-hyperswitch/merchant-controls/integration-guide/web/customization#id-9.-hide-card-nickname-field .
Additional Changes
Motivation and Context
How did you test it?
Secure links
1. Update `allowed_domains` in business profile - (unfold to view cURL)
2. Create a payment link - (unfold to view cURL)
Checklist
cargo +nightly fmt --all
cargo clippy