@@ -335,7 +335,6 @@ impl TryFrom<&SetupMandateRouterData> for CybersourceZeroMandateRequest {
335
335
) ) ?
336
336
}
337
337
} ;
338
- let cavv_algorithm = Some ( "2" . to_string ( ) ) ;
339
338
340
339
let processing_information = ProcessingInformation {
341
340
capture : Some ( false ) ,
@@ -345,7 +344,6 @@ impl TryFrom<&SetupMandateRouterData> for CybersourceZeroMandateRequest {
345
344
authorization_options,
346
345
commerce_indicator : String :: from ( "internet" ) ,
347
346
payment_solution : solution. map ( String :: from) ,
348
- cavv_algorithm,
349
347
} ;
350
348
Ok ( Self {
351
349
processing_information,
@@ -379,7 +377,6 @@ pub struct ProcessingInformation {
379
377
capture : Option < bool > ,
380
378
capture_options : Option < CaptureOptions > ,
381
379
payment_solution : Option < String > ,
382
- cavv_algorithm : Option < String > ,
383
380
}
384
381
385
382
#[ derive( Debug , Serialize ) ]
@@ -425,13 +422,15 @@ pub struct CybersourceConsumerAuthInformation {
425
422
/// This field indicates the authentication type or challenge presented to the cardholder at checkout.
426
423
challenge_code : Option < String > ,
427
424
/// This field indicates the reason for payer authentication response status. It is only supported for secure transactions in France.
428
- pares_status_reason : Option < String > ,
425
+ signed_pares_status_reason : Option < String > ,
429
426
/// This field indicates the reason why strong authentication was cancelled. It is only supported for secure transactions in France.
430
427
challenge_cancel_code : Option < String > ,
431
428
/// This field indicates the score calculated by the 3D Securing platform. It is only supported for secure transactions in France.
432
429
network_score : Option < u32 > ,
433
430
/// This is the transaction ID generated by the access control server. This field is supported only for secure transactions in France.
434
431
acs_transaction_id : Option < String > ,
432
+ /// This is the algorithm for generating a cardholder authentication verification value (CAVV) or universal cardholder authentication field (UCAF) data.
433
+ cavv_algorithm : Option < String > ,
435
434
}
436
435
437
436
#[ derive( Debug , Serialize ) ]
@@ -1007,11 +1006,6 @@ impl
1007
1006
. map ( |eci| get_commerce_indicator_for_external_authentication ( network, eci) )
1008
1007
} ) ;
1009
1008
1010
- // The 3DS Server might not include the `cavvAlgorithm` field in the challenge response.
1011
- // In such cases, we default to "2", which represents the CVV with Authentication Transaction Number (ATN) algorithm.
1012
- // This is the most commonly used value for 3DS 2.0 transactions (e.g., Visa, Mastercard).
1013
- let cavv_algorithm = Some ( "2" . to_string ( ) ) ;
1014
-
1015
1009
Ok ( Self {
1016
1010
capture : Some ( matches ! (
1017
1011
item. router_data. request. capture_method,
@@ -1024,7 +1018,6 @@ impl
1024
1018
capture_options : None ,
1025
1019
commerce_indicator : commerce_indicator_for_external_authentication
1026
1020
. unwrap_or ( commerce_indicator) ,
1027
- cavv_algorithm,
1028
1021
} )
1029
1022
}
1030
1023
}
@@ -1121,7 +1114,6 @@ impl
1121
1114
} else {
1122
1115
( None , None , None )
1123
1116
} ;
1124
- let cavv_algorithm = Some ( "2" . to_string ( ) ) ;
1125
1117
1126
1118
Ok ( Self {
1127
1119
capture : Some ( matches ! (
@@ -1137,7 +1129,6 @@ impl
1137
1129
. indicator
1138
1130
. to_owned ( )
1139
1131
. unwrap_or ( String :: from ( "internet" ) ) ,
1140
- cavv_algorithm,
1141
1132
} )
1142
1133
}
1143
1134
}
@@ -1456,6 +1447,11 @@ impl
1456
1447
. and_then ( |exts| extract_score_id ( & exts) )
1457
1448
} ) ;
1458
1449
1450
+ // The 3DS Server might not include the `cavvAlgorithm` field in the challenge response.
1451
+ // In such cases, we default to "2", which represents the CVV with Authentication Transaction Number (ATN) algorithm.
1452
+ // This is the most commonly used value for 3DS 2.0 transactions (e.g., Visa, Mastercard).
1453
+ let cavv_algorithm = Some ( "2" . to_string ( ) ) ;
1454
+
1459
1455
CybersourceConsumerAuthInformation {
1460
1456
pares_status,
1461
1457
ucaf_collection_indicator,
@@ -1473,10 +1469,11 @@ impl
1473
1469
authentication_date,
1474
1470
effective_authentication_type,
1475
1471
challenge_code : authn_data. challenge_code . clone ( ) ,
1476
- pares_status_reason : authn_data. challenge_code_reason . clone ( ) ,
1472
+ signed_pares_status_reason : authn_data. challenge_code_reason . clone ( ) ,
1477
1473
challenge_cancel_code : authn_data. challenge_cancel . clone ( ) ,
1478
1474
network_score,
1479
1475
acs_transaction_id : authn_data. acs_trans_id . clone ( ) ,
1476
+ cavv_algorithm,
1480
1477
}
1481
1478
} ) ;
1482
1479
@@ -1577,6 +1574,8 @@ impl
1577
1574
. and_then ( |exts| extract_score_id ( & exts) )
1578
1575
} ) ;
1579
1576
1577
+ let cavv_algorithm = Some ( "2" . to_string ( ) ) ;
1578
+
1580
1579
CybersourceConsumerAuthInformation {
1581
1580
pares_status,
1582
1581
ucaf_collection_indicator,
@@ -1594,10 +1593,11 @@ impl
1594
1593
authentication_date,
1595
1594
effective_authentication_type,
1596
1595
challenge_code : authn_data. challenge_code . clone ( ) ,
1597
- pares_status_reason : authn_data. challenge_code_reason . clone ( ) ,
1596
+ signed_pares_status_reason : authn_data. challenge_code_reason . clone ( ) ,
1598
1597
challenge_cancel_code : authn_data. challenge_cancel . clone ( ) ,
1599
1598
network_score,
1600
1599
acs_transaction_id : authn_data. acs_trans_id . clone ( ) ,
1600
+ cavv_algorithm,
1601
1601
}
1602
1602
} ) ;
1603
1603
@@ -1702,6 +1702,8 @@ impl
1702
1702
. and_then ( |exts| extract_score_id ( & exts) )
1703
1703
} ) ;
1704
1704
1705
+ let cavv_algorithm = Some ( "2" . to_string ( ) ) ;
1706
+
1705
1707
CybersourceConsumerAuthInformation {
1706
1708
pares_status,
1707
1709
ucaf_collection_indicator,
@@ -1719,10 +1721,11 @@ impl
1719
1721
authentication_date,
1720
1722
effective_authentication_type,
1721
1723
challenge_code : authn_data. challenge_code . clone ( ) ,
1722
- pares_status_reason : authn_data. challenge_code_reason . clone ( ) ,
1724
+ signed_pares_status_reason : authn_data. challenge_code_reason . clone ( ) ,
1723
1725
challenge_cancel_code : authn_data. challenge_cancel . clone ( ) ,
1724
1726
network_score,
1725
1727
acs_transaction_id : authn_data. acs_trans_id . clone ( ) ,
1728
+ cavv_algorithm,
1726
1729
}
1727
1730
} ) ;
1728
1731
@@ -1907,10 +1910,11 @@ impl
1907
1910
authentication_date : None ,
1908
1911
effective_authentication_type : None ,
1909
1912
challenge_code : None ,
1910
- pares_status_reason : None ,
1913
+ signed_pares_status_reason : None ,
1911
1914
challenge_cancel_code : None ,
1912
1915
network_score : None ,
1913
1916
acs_transaction_id : None ,
1917
+ cavv_algorithm : None ,
1914
1918
} ) ;
1915
1919
1916
1920
let merchant_defined_information = item
@@ -2014,10 +2018,11 @@ impl
2014
2018
authentication_date : None ,
2015
2019
effective_authentication_type : None ,
2016
2020
challenge_code : None ,
2017
- pares_status_reason : None ,
2021
+ signed_pares_status_reason : None ,
2018
2022
challenge_cancel_code : None ,
2019
2023
network_score : None ,
2020
2024
acs_transaction_id : None ,
2025
+ cavv_algorithm : None ,
2021
2026
} ) ,
2022
2027
merchant_defined_information,
2023
2028
} )
@@ -2166,10 +2171,11 @@ impl
2166
2171
authentication_date : None ,
2167
2172
effective_authentication_type : None ,
2168
2173
challenge_code : None ,
2169
- pares_status_reason : None ,
2174
+ signed_pares_status_reason : None ,
2170
2175
challenge_cancel_code : None ,
2171
2176
network_score : None ,
2172
2177
acs_transaction_id : None ,
2178
+ cavv_algorithm : None ,
2173
2179
} ) ,
2174
2180
merchant_defined_information,
2175
2181
} )
@@ -2384,10 +2390,11 @@ impl TryFrom<&CybersourceRouterData<&PaymentsAuthorizeRouterData>> for Cybersour
2384
2390
authentication_date : None ,
2385
2391
effective_authentication_type : None ,
2386
2392
challenge_code : None ,
2387
- pares_status_reason : None ,
2393
+ signed_pares_status_reason : None ,
2388
2394
challenge_cancel_code : None ,
2389
2395
network_score : None ,
2390
2396
acs_transaction_id : None ,
2397
+ cavv_algorithm : None ,
2391
2398
} ,
2392
2399
) ,
2393
2400
} )
@@ -2658,7 +2665,6 @@ impl TryFrom<&CybersourceRouterData<&PaymentsCaptureRouterData>>
2658
2665
)
2659
2666
. then_some ( true ) ;
2660
2667
2661
- let cavv_algorithm = Some ( "2" . to_string ( ) ) ;
2662
2668
Ok ( Self {
2663
2669
processing_information : ProcessingInformation {
2664
2670
capture_options : Some ( CaptureOptions {
@@ -2672,7 +2678,6 @@ impl TryFrom<&CybersourceRouterData<&PaymentsCaptureRouterData>>
2672
2678
capture : None ,
2673
2679
commerce_indicator : String :: from ( "internet" ) ,
2674
2680
payment_solution : None ,
2675
- cavv_algorithm,
2676
2681
} ,
2677
2682
order_information : OrderInformationWithBill {
2678
2683
amount_details : Amount {
@@ -2698,7 +2703,6 @@ impl TryFrom<&CybersourceRouterData<&PaymentsIncrementalAuthorizationRouterData>
2698
2703
) -> Result < Self , Self :: Error > {
2699
2704
let connector_merchant_config =
2700
2705
CybersourceConnectorMetadataObject :: try_from ( & item. router_data . connector_meta_data ) ?;
2701
- let cavv_algorithm = Some ( "2" . to_string ( ) ) ;
2702
2706
2703
2707
Ok ( Self {
2704
2708
processing_information : ProcessingInformation {
@@ -2722,7 +2726,6 @@ impl TryFrom<&CybersourceRouterData<&PaymentsIncrementalAuthorizationRouterData>
2722
2726
capture : None ,
2723
2727
capture_options : None ,
2724
2728
payment_solution : None ,
2725
- cavv_algorithm,
2726
2729
} ,
2727
2730
order_information : OrderInformationIncrementalAuthorization {
2728
2731
amount_details : AdditionalAmount {
0 commit comments