diff --git a/crates/router/src/core/payment_methods/cards.rs b/crates/router/src/core/payment_methods/cards.rs index 124b5f91c3..842b67e561 100644 --- a/crates/router/src/core/payment_methods/cards.rs +++ b/crates/router/src/core/payment_methods/cards.rs @@ -316,7 +316,10 @@ pub async fn add_card_hs( req, merchant_id, ); - Ok((payment_method_resp, store_card_payload.duplicate)) + Ok(( + payment_method_resp, + store_card_payload.duplicate.unwrap_or(false), + )) } // Legacy Locker Function @@ -586,7 +589,7 @@ pub async fn mock_add_card_hs( .change_context(errors::VaultError::SaveCardFailed)?; let payload = payment_methods::StoreCardRespPayload { card_reference: response.card_id, - duplicate: false, + duplicate: Some(false), }; Ok(payment_methods::StoreCardResp { status: "SUCCESS".to_string(), diff --git a/crates/router/src/core/payment_methods/transformers.rs b/crates/router/src/core/payment_methods/transformers.rs index 2fbb1cde86..426fae223d 100644 --- a/crates/router/src/core/payment_methods/transformers.rs +++ b/crates/router/src/core/payment_methods/transformers.rs @@ -44,7 +44,7 @@ pub struct StoreCardResp { #[derive(Debug, Deserialize, Serialize)] pub struct StoreCardRespPayload { pub card_reference: String, - pub duplicate: bool, + pub duplicate: Option, } #[derive(Debug, Deserialize, Serialize)]