Skip to content

Commit

Permalink
fix(router): fix token fetch logic in complete authorize flow for thr…
Browse files Browse the repository at this point in the history
…ee ds payments (#4052)
  • Loading branch information
vspecky authored Mar 13, 2024
1 parent 5c380de commit ada0002
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,14 @@ impl<F: Send + Clone, Ctx: PaymentMethodRetrieve>
}
}

let token_data = if let Some(token) = token.clone() {
Some(helpers::retrieve_payment_token_data(state, token, payment_method).await?)
let token_data = if let Some((token, payment_method)) = token
.as_ref()
.zip(payment_method.or(payment_attempt.payment_method))
{
Some(
helpers::retrieve_payment_token_data(state, token.clone(), Some(payment_method))
.await?,
)
} else {
None
};
Expand Down

0 comments on commit ada0002

Please sign in to comment.