mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
refactor: make NextAction as enum (#1234)
This commit is contained in:
committed by
GitHub
parent
48e537568d
commit
a359b76d09
@ -380,7 +380,10 @@ impl PaymentRedirectFlow for PaymentRedirectCompleteAuthorize {
|
||||
api_models::enums::IntentStatus::RequiresCustomerAction => {
|
||||
let startpay_url = payments_response
|
||||
.next_action
|
||||
.and_then(|next_action| next_action.redirect_to_url)
|
||||
.and_then(|next_action_data| match next_action_data {
|
||||
api_models::payments::NextActionData::RedirectToUrl { redirect_to_url } => Some(redirect_to_url),
|
||||
api_models::payments::NextActionData::DisplayBankTransferInformation { .. } => None,
|
||||
})
|
||||
.ok_or(errors::ApiErrorResponse::InternalServerError)
|
||||
.into_report()
|
||||
.attach_printable(
|
||||
|
||||
Reference in New Issue
Block a user