Skip to content

Commit b12762e

Browse files
authored
fix: duplication check fix in basilisk-hs (#881)
1 parent 9f90b88 commit b12762e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

crates/router/src/core/payment_methods/cards.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,10 @@ pub async fn add_card_hs(
316316
req,
317317
merchant_id,
318318
);
319-
Ok((payment_method_resp, store_card_payload.duplicate))
319+
Ok((
320+
payment_method_resp,
321+
store_card_payload.duplicate.unwrap_or(false),
322+
))
320323
}
321324

322325
// Legacy Locker Function
@@ -586,7 +589,7 @@ pub async fn mock_add_card_hs(
586589
.change_context(errors::VaultError::SaveCardFailed)?;
587590
let payload = payment_methods::StoreCardRespPayload {
588591
card_reference: response.card_id,
589-
duplicate: false,
592+
duplicate: Some(false),
590593
};
591594
Ok(payment_methods::StoreCardResp {
592595
status: "SUCCESS".to_string(),

crates/router/src/core/payment_methods/transformers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub struct StoreCardResp {
4444
#[derive(Debug, Deserialize, Serialize)]
4545
pub struct StoreCardRespPayload {
4646
pub card_reference: String,
47-
pub duplicate: bool,
47+
pub duplicate: Option<bool>,
4848
}
4949

5050
#[derive(Debug, Deserialize, Serialize)]

0 commit comments

Comments
 (0)