File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
crates/router/src/core/payment_methods Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -316,7 +316,10 @@ pub async fn add_card_hs(
316
316
req,
317
317
merchant_id,
318
318
) ;
319
- Ok ( ( payment_method_resp, store_card_payload. duplicate ) )
319
+ Ok ( (
320
+ payment_method_resp,
321
+ store_card_payload. duplicate . unwrap_or ( false ) ,
322
+ ) )
320
323
}
321
324
322
325
// Legacy Locker Function
@@ -586,7 +589,7 @@ pub async fn mock_add_card_hs(
586
589
. change_context ( errors:: VaultError :: SaveCardFailed ) ?;
587
590
let payload = payment_methods:: StoreCardRespPayload {
588
591
card_reference : response. card_id ,
589
- duplicate : false ,
592
+ duplicate : Some ( false ) ,
590
593
} ;
591
594
Ok ( payment_methods:: StoreCardResp {
592
595
status : "SUCCESS" . to_string ( ) ,
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ pub struct StoreCardResp {
44
44
#[ derive( Debug , Deserialize , Serialize ) ]
45
45
pub struct StoreCardRespPayload {
46
46
pub card_reference : String ,
47
- pub duplicate : bool ,
47
+ pub duplicate : Option < bool > ,
48
48
}
49
49
50
50
#[ derive( Debug , Deserialize , Serialize ) ]
You can’t perform that action at this time.
0 commit comments