Skip to content

Commit

Permalink
feat(connector): [Klarna] Use connector_request_reference_id as refer…
Browse files Browse the repository at this point in the history
…ence to connector (#2494)
  • Loading branch information
HarshitVashisht11 authored Oct 15, 2023
1 parent 8971b17 commit 2609ef6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/router/src/connector/klarna/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pub struct KlarnaPaymentsRequest {
order_amount: i64,
purchase_country: String,
purchase_currency: enums::Currency,
merchant_reference1: String,
}

#[derive(Default, Debug, Deserialize)]
Expand Down Expand Up @@ -140,6 +141,7 @@ impl TryFrom<&KlarnaRouterData<&types::PaymentsAuthorizeRouterData>> for KlarnaP
total_amount: i64::from(data.quantity) * (data.amount),
})
.collect(),
merchant_reference1: item.router_data.connector_request_reference_id.clone(),
}),
None => Err(report!(errors::ConnectorError::MissingRequiredField {
field_name: "product_name"
Expand Down

0 comments on commit 2609ef6

Please sign in to comment.