mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
fix(locker): remove delete_locker_payment_method_by_lookup_key from payments_operation_core (#1636)
This commit is contained in:
@ -28,10 +28,7 @@ use self::{
|
||||
use super::errors::StorageErrorExt;
|
||||
use crate::{
|
||||
configs::settings::PaymentMethodTypeTokenFilter,
|
||||
core::{
|
||||
errors::{self, CustomResult, RouterResponse, RouterResult},
|
||||
payment_methods::vault,
|
||||
},
|
||||
core::errors::{self, CustomResult, RouterResponse, RouterResult},
|
||||
db::StorageInterface,
|
||||
logger,
|
||||
routes::{metrics, AppState},
|
||||
@ -198,11 +195,6 @@ where
|
||||
.await?
|
||||
}
|
||||
};
|
||||
|
||||
if should_delete_pm_from_locker(payment_data.payment_intent.status) {
|
||||
vault::Vault::delete_locker_payment_method_by_lookup_key(state, &payment_data.token)
|
||||
.await
|
||||
}
|
||||
} else {
|
||||
(_, payment_data) = operation
|
||||
.to_update_tracker()?
|
||||
@ -1188,13 +1180,6 @@ pub fn should_call_connector<Op: Debug, F: Clone>(
|
||||
}
|
||||
}
|
||||
|
||||
pub fn should_delete_pm_from_locker(status: storage_enums::IntentStatus) -> bool {
|
||||
!matches!(
|
||||
status,
|
||||
storage_models::enums::IntentStatus::RequiresCustomerAction
|
||||
)
|
||||
}
|
||||
|
||||
pub fn is_operation_confirm<Op: Debug>(operation: &Op) -> bool {
|
||||
matches!(format!("{operation:?}").as_str(), "PaymentConfirm")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user