feat(payment_methods): delete payment method using payment token (#258)

Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
Manoj Ghorela
2023-01-03 11:11:23 +05:30
committed by GitHub
parent 4b4a9967b3
commit f42ea8d4a4
9 changed files with 99 additions and 41 deletions

View File

@ -52,9 +52,12 @@ pub async fn construct_refund_router_data<'a, F>(
let payment_method_data = match payment_method_data.cloned() {
Some(v) => v,
None => {
helpers::Vault::get_payment_method_data_from_locker(state, &payment_attempt.attempt_id)
.await?
.get_required_value("payment_method_data")?
let (pm, _) = helpers::Vault::get_payment_method_data_from_locker(
state,
&payment_attempt.attempt_id,
)
.await?;
pm.get_required_value("payment_method_data")?
}
};