mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +08:00
feat(router): Better UI payment link and order details product image and merchant config support (#2583)
Co-authored-by: Sahkal Poddar <sahkal.poddar@juspay.in> Co-authored-by: Kashif <46213975+kashif-m@users.noreply.github.com> Co-authored-by: Kashif <mohammed.kashif@juspay.in> Co-authored-by: Bernard Eugine <114725419+bernard-eugine@users.noreply.github.com> Co-authored-by: Kashif <kashif@protonmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -136,6 +136,17 @@ pub async fn create_merchant_account(
|
||||
.transpose()?
|
||||
.map(Secret::new);
|
||||
|
||||
let payment_link_config = req
|
||||
.payment_link_config
|
||||
.as_ref()
|
||||
.map(|pl_metadata| {
|
||||
utils::Encode::<admin_types::PaymentLinkConfig>::encode_to_value(pl_metadata)
|
||||
.change_context(errors::ApiErrorResponse::InvalidDataValue {
|
||||
field_name: "payment_link_config",
|
||||
})
|
||||
})
|
||||
.transpose()?;
|
||||
|
||||
let mut merchant_account = async {
|
||||
Ok(domain::MerchantAccount {
|
||||
merchant_id: req.merchant_id,
|
||||
@ -171,6 +182,7 @@ pub async fn create_merchant_account(
|
||||
is_recon_enabled: false,
|
||||
default_profile: None,
|
||||
recon_status: diesel_models::enums::ReconStatus::NotRequested,
|
||||
payment_link_config,
|
||||
})
|
||||
}
|
||||
.await
|
||||
@ -458,6 +470,7 @@ pub async fn merchant_account_update(
|
||||
intent_fulfillment_time: req.intent_fulfillment_time.map(i64::from),
|
||||
payout_routing_algorithm: req.payout_routing_algorithm,
|
||||
default_profile: business_profile_id_update,
|
||||
payment_link_config: req.payment_link_config,
|
||||
};
|
||||
|
||||
let response = db
|
||||
|
||||
Reference in New Issue
Block a user