feat(connector): implement pre auth flow for gpayments (#4692)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Hrithikesh
2024-05-30 13:13:22 +05:30
committed by GitHub
parent 971ef1fb8f
commit bed42ce4be
18 changed files with 643 additions and 78 deletions

View File

@ -84,6 +84,7 @@ pub async fn update_trackers<F: Clone, Req>(
authn_flow_type,
authentication_value,
trans_status,
connector_metadata,
ds_trans_id,
} => {
let authentication_status =
@ -98,6 +99,7 @@ pub async fn update_trackers<F: Clone, Req>(
acs_signed_content: authn_flow_type.get_acs_signed_content(),
authentication_type: authn_flow_type.get_decoupled_authentication_type(),
authentication_status,
connector_metadata,
ds_trans_id,
}
}
@ -113,6 +115,28 @@ pub async fn update_trackers<F: Clone, Req>(
authentication_value,
eci,
},
AuthenticationResponseData::PreAuthVersionCallResponse {
maximum_supported_3ds_version,
} => storage::AuthenticationUpdate::PreAuthenticationVersionCallUpdate {
message_version: maximum_supported_3ds_version.clone(),
maximum_supported_3ds_version,
},
AuthenticationResponseData::PreAuthThreeDsMethodCallResponse {
threeds_server_transaction_id,
three_ds_method_data,
three_ds_method_url,
connector_metadata,
} => storage::AuthenticationUpdate::PreAuthenticationThreeDsMethodCall {
threeds_server_transaction_id,
three_ds_method_data,
three_ds_method_url,
connector_metadata,
acquirer_bin: acquirer_details
.as_ref()
.map(|acquirer_details| acquirer_details.acquirer_bin.clone()),
acquirer_merchant_id: acquirer_details
.map(|acquirer_details| acquirer_details.acquirer_merchant_id),
},
},
Err(error) => storage::AuthenticationUpdate::ErrorUpdate {
connector_authentication_id: error.connector_transaction_id,