fix: duplication check fix in basilisk-hs (#881)

This commit is contained in:
Sangamesh Kulkarni
2023-04-14 16:30:52 +05:30
committed by GitHub
parent 9f90b888c8
commit b12762e776
2 changed files with 6 additions and 3 deletions

View File

@ -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(),

View File

@ -44,7 +44,7 @@ pub struct StoreCardResp {
#[derive(Debug, Deserialize, Serialize)]
pub struct StoreCardRespPayload {
pub card_reference: String,
pub duplicate: bool,
pub duplicate: Option<bool>,
}
#[derive(Debug, Deserialize, Serialize)]