@@ -978,6 +978,14 @@ async fn payment_response_update_tracker<F: Clone, T: types::Capturable>(
978
978
. change_context ( errors:: ApiErrorResponse :: InternalServerError )
979
979
. attach_printable ( "Could not parse the connector response" ) ?;
980
980
981
+ let auth_update = if Some ( router_data. auth_type )
982
+ != payment_data. payment_attempt . authentication_type
983
+ {
984
+ Some ( router_data. auth_type )
985
+ } else {
986
+ None
987
+ } ;
988
+
981
989
// incase of success, update error code and error message
982
990
let error_status =
983
991
if router_data. status == enums:: AttemptStatus :: Charged {
@@ -1018,15 +1026,20 @@ async fn payment_response_update_tracker<F: Clone, T: types::Capturable>(
1018
1026
multiple_capture_data. get_latest_capture( ) . clone( ) ,
1019
1027
capture_update,
1020
1028
) ] ;
1021
- ( Some ( ( multiple_capture_data, capture_update_list) ) , None )
1029
+ ( Some ( ( multiple_capture_data, capture_update_list) ) , auth_update. map ( |auth_type| {
1030
+ storage:: PaymentAttemptUpdate :: AuthenticationTypeUpdate {
1031
+ authentication_type : auth_type,
1032
+ updated_by : storage_scheme. to_string ( ) ,
1033
+ }
1034
+ } ) )
1022
1035
}
1023
1036
None => (
1024
1037
None ,
1025
1038
Some ( storage:: PaymentAttemptUpdate :: ResponseUpdate {
1026
1039
status : updated_attempt_status,
1027
1040
connector : None ,
1028
1041
connector_transaction_id : connector_transaction_id. clone ( ) ,
1029
- authentication_type : None ,
1042
+ authentication_type : auth_update ,
1030
1043
amount_capturable : router_data
1031
1044
. request
1032
1045
. get_amount_capturable (
0 commit comments