Skip to content

Commit

Permalink
fix: null value in session token in next action (#2111)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangamesh26 authored Sep 10, 2023
1 parent 0792605 commit f015394
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions crates/router/src/connector/trustpay/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1073,8 +1073,8 @@ pub fn get_apple_pay_session<F, T>(
))),
connector_response_reference_id: None,
}),
// We don't get status from TrustPay but status should be pending by default for session response
status: diesel_models::enums::AttemptStatus::Pending,
// We don't get status from TrustPay but status should be AuthenticationPending by default for session response
status: diesel_models::enums::AttemptStatus::AuthenticationPending,
..item.data
})
}
Expand Down Expand Up @@ -1120,8 +1120,8 @@ pub fn get_google_pay_session<F, T>(
))),
connector_response_reference_id: None,
}),
// We don't get status from TrustPay but status should be pending by default for session response
status: diesel_models::enums::AttemptStatus::Pending,
// We don't get status from TrustPay but status should be AuthenticationPending by default for session response
status: diesel_models::enums::AttemptStatus::AuthenticationPending,
..item.data
})
}
Expand Down
24 changes: 12 additions & 12 deletions crates/router/src/core/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,15 +588,15 @@ where
)
.await?;

let (mut payment_data, tokenization_action) =
get_connector_tokenization_action_when_confirm_true(
state,
operation,
payment_data,
validate_result,
&merchant_connector_account,
)
.await?;
let (pd, tokenization_action) = get_connector_tokenization_action_when_confirm_true(
state,
operation,
payment_data,
validate_result,
&merchant_connector_account,
)
.await?;
*payment_data = pd;

let mut router_data = payment_data
.construct_router_data(
Expand Down Expand Up @@ -662,7 +662,7 @@ where
(router_data, should_continue_further) = complete_preprocessing_steps_if_required(
state,
&connector,
&payment_data,
payment_data,
router_data,
operation,
should_continue_further,
Expand All @@ -688,7 +688,7 @@ where
(None, false)
};

if should_add_task_to_process_tracker(&payment_data) {
if should_add_task_to_process_tracker(payment_data) {
operation
.to_domain()?
.add_task_to_process_tracker(
Expand All @@ -705,7 +705,7 @@ where
// Update the payment trackers just before calling the connector
// Since the request is already built in the previous step,
// there should be no error in request construction from hyperswitch end
(_, payment_data) = operation
(_, *payment_data) = operation
.to_update_tracker()?
.update_trackers(
&*state.store,
Expand Down

0 comments on commit f015394

Please sign in to comment.