Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Sweta-Kumari-Sharma committed Nov 20, 2024
1 parent 476ef14 commit cfc70cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
4 changes: 2 additions & 2 deletions crates/router/src/connector/klarna/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ impl TryFrom<&KlarnaRouterData<&types::PaymentsAuthorizeRouterData>> for KlarnaA
merchant_urls: MerchantURLs {
terms: return_url.clone(),
checkout: return_url.clone(),
confirmation: return_url.clone(),
push: return_url,
confirmation: "https://google.com".to_string(),
push: "https://google.com".to_string(),
},
auto_capture: request.is_auto_capture()?,
shipping_address: get_address_info(item.router_data.get_optional_shipping())
Expand Down
26 changes: 6 additions & 20 deletions crates/router/src/core/payments/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4540,26 +4540,12 @@ pub async fn get_additional_payment_data(
google_pay: None,
})),
},
domain::PaymentMethodData::PayLater(pay_later) => match pay_later {
domain::PayLaterData::KlarnaSdk { token: _ } => Ok(Some(
api_models::payments::AdditionalPaymentData::PayLater {
klarna_sdk: None,
klarna_checkout: None,
},
)),
domain::PayLaterData::KlarnaCheckout {} => Ok(Some(
api_models::payments::AdditionalPaymentData::PayLater {
klarna_sdk: None,
klarna_checkout: None,
},
)),
_ => Ok(Some(
api_models::payments::AdditionalPaymentData::PayLater {
klarna_sdk: None,
klarna_checkout: None,
},
)),
},
domain::PaymentMethodData::PayLater(_) => Ok(Some(
api_models::payments::AdditionalPaymentData::PayLater {
klarna_sdk: None,
klarna_checkout: None,
},
)),
domain::PaymentMethodData::BankTransfer(bank_transfer) => Ok(Some(
api_models::payments::AdditionalPaymentData::BankTransfer {
details: Some((*(bank_transfer.to_owned())).into()),
Expand Down

0 comments on commit cfc70cf

Please sign in to comment.