-
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(payment_link): add multiple custom css support in business level #5137
feat(payment_link): add multiple custom css support in business level #5137
Conversation
…siness-level-for-payment-link' of https://github.com/juspay/hyperswitch into 5582-payment-link-add-multiple-custom-css-support-in-business-level-for-payment-link
…siness-level-for-payment-link' of https://github.com/juspay/hyperswitch into 5582-payment-link-add-multiple-custom-css-support-in-business-level-for-payment-link
…pport-in-business-level-for-payment-link
…pport-in-business-level-for-payment-link
.to_currency_base_unit(payment_intent.amount.get_amount_as_i64()) | ||
.change_context(errors::ApiErrorResponse::CurrencyConversionFailed)?; | ||
|
||
let required_conversion_type = StringMajorUnitForConnector; |
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 should have a different type for this like StringMajorUnit
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.
i cant use pub struct StringMajorUnit
since we are already using it for conversion type pub struct StringMajorUnit(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.
done, added StringMajorUnitForCore
type to impl on!
@@ -468,6 +468,9 @@ pub struct PaymentsRequest { | |||
#[schema(value_type = Option<PaymentCreatePaymentLinkConfig>)] | |||
pub payment_link_config: Option<PaymentCreatePaymentLinkConfig>, | |||
|
|||
/// custom payment link config id set at business profile send only if business_specific_configs is configured | |||
pub payment_link_config_id: Option<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.
can this be sent in Confirm and update as well? If not can you hide it in the api ref for those two requests?
…ror-handling-in-cypress * 'main' of github.com:juspay/hyperswitch: fix(auth_methods): Add checks for duplicate `auth_method` in create API (#5161) chore(version): 2024.07.02.0 fix(router): rename the browser name header to `x-browser-name` (#5162) fix(router): mark retry payment as failure if `connector_tokenization` fails (#5114) fix(connector): [Paypal] dispute webhook deserialization failure (#5111) feat(analytics): Add v2 payment analytics (payment-intents analytics) (#5150) feat(globalsearch): Implement tag-based filters in global search (#5151) refactor(connector): Add amount conversion framework to iatapay along with amount conversion code to connector template (#4866) feat(payment_link): add multiple custom css support in business level (#5137) feat(connector): [Bambora Apac] Template for integration (#5062) feat(tls): add support for https in actix web (#5089) chore(ci): fix ci tests failing by removing them (#5167) chore(version): 2024.07.01.0 chore(postman): update Postman collection files ci(postman): log request id for user tests (#5159) chore(euclid_wasm): make field domain optional wasm (#5154)
Type of Change
Description
Currently we support one theme config for payment link that can be set in business profile level, with this PR we will allow multiple payment link theme configuration in business profile.
Additional Changes
we are adding a new optional param that is
business_specific_configs
for multi theme configurationHow did you test it?
Create Merchant account
Create Payment Connector
Create Api-key
Now,
Updating the default business profile with payment link config with
business_specific_configs
Do Payments Create
Case 1: incase,
business_specific_configs
is present and key is not send in payment create request, config will be picked up from the default config.Case 2:incase,
business_specific_configs
is present and key is send in the request, then it should pick up config from the config mapped to the key in business profile.Case 3 :incase,
business_specific_configs
is present and invalid key is send in the request, then it should pick up default config from business profile.Checklist
cargo +nightly fmt --all
cargo clippy