diff --git a/crates/router/src/core/payment_methods/cards.rs b/crates/router/src/core/payment_methods/cards.rs index 9922af121c..ee9a8ea546 100644 --- a/crates/router/src/core/payment_methods/cards.rs +++ b/crates/router/src/core/payment_methods/cards.rs @@ -280,8 +280,8 @@ pub async fn mock_delete_card<'a>( .await .change_context(errors::VaultError::FetchCardFailed)?; Ok(payment_methods::DeleteCardResponse { - card_id: locker_mock_up.card_id, - external_id: locker_mock_up.external_id, + card_id: Some(locker_mock_up.card_id), + external_id: Some(locker_mock_up.external_id), card_isin: None, 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 c8b22c4b41..d646666f1a 100644 --- a/crates/router/src/core/payment_methods/transformers.rs +++ b/crates/router/src/core/payment_methods/transformers.rs @@ -57,8 +57,8 @@ pub struct GetCardResponse { #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct DeleteCardResponse { - pub card_id: String, - pub external_id: String, + pub card_id: Option, + pub external_id: Option, pub card_isin: Option>, pub status: String, } diff --git a/crates/router/src/core/payment_methods/vault.rs b/crates/router/src/core/payment_methods/vault.rs index 9ca121cd27..3532761ad5 100644 --- a/crates/router/src/core/payment_methods/vault.rs +++ b/crates/router/src/core/payment_methods/vault.rs @@ -91,7 +91,7 @@ impl Vaultable for api::CCard { let supp_data = SupplementaryVaultData { customer_id: value2.customer_id, - payment_method_id: None, + payment_method_id: value2.payment_method_id, }; Ok((card, supp_data))