Skip to content

Commit 15418a6

Browse files
fix(router): move get_connector_tokenization_action_when_confirm_true above call_create_connector_customer_if_required (#2167)
1 parent 0bc99ad commit 15418a6

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

crates/router/src/core/payments.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -594,15 +594,6 @@ where
594594
)
595595
.await?;
596596

597-
let updated_customer = call_create_connector_customer_if_required(
598-
state,
599-
customer,
600-
merchant_account,
601-
key_store,
602-
payment_data,
603-
)
604-
.await?;
605-
606597
let (pd, tokenization_action) = get_connector_tokenization_action_when_confirm_true(
607598
state,
608599
operation,
@@ -611,8 +602,18 @@ where
611602
&merchant_connector_account,
612603
)
613604
.await?;
605+
614606
*payment_data = pd;
615607

608+
let updated_customer = call_create_connector_customer_if_required(
609+
state,
610+
customer,
611+
merchant_account,
612+
key_store,
613+
payment_data,
614+
)
615+
.await?;
616+
616617
let mut router_data = payment_data
617618
.construct_router_data(
618619
state,

0 commit comments

Comments
 (0)