refactor(payment_methods): prevent deletion of default payment method for a customer (#3964)

This commit is contained in:
Chethan Rao
2024-03-06 19:05:28 +05:30
committed by GitHub
parent 3806cd35c7
commit db39bb0a3c
5 changed files with 29 additions and 2 deletions

View File

@ -253,7 +253,9 @@ pub async fn payment_method_delete_api(
state,
&req,
pm,
|state, auth, req| cards::delete_payment_method(state, auth.merchant_account, req),
|state, auth, req| {
cards::delete_payment_method(state, auth.merchant_account, req, auth.key_store)
},
&auth::ApiKeyAuth,
api_locking::LockAction::NotApplicable,
))