fix: Use setup future usage for saving card (#401)

This commit is contained in:
Manoj Ghorela
2023-01-18 16:28:38 +05:30
committed by GitHub
parent b5ffff30df
commit 8055f64d75
2 changed files with 10 additions and 0 deletions

View File

@ -552,6 +552,7 @@ pub enum RoutableConnectors {
Globalpay,
Klarna,
Payu,
Rapyd,
Shift4,
Stripe,
Worldline,

View File

@ -183,6 +183,15 @@ where
)
})?;
};
} else if resp.request.get_setup_future_usage().is_some() {
helpers::call_payment_method(
state,
merchant_account,
Some(&resp.request.get_payment_method_data()),
Some(resp.payment_method),
maybe_customer,
)
.await?;
}
}
}