feat(payments_v2): payment intent diesel and domain models changes v2 (#5783)

Co-authored-by: hrithikesh026 <hrithikesh.vm@juspay.in>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Narayan Bhat
2024-09-13 13:11:38 +05:30
committed by GitHub
parent 71bf627fbc
commit 10ac089449
59 changed files with 2893 additions and 762 deletions

View File

@ -34,13 +34,15 @@ use masking::PeekInterface;
use router_env::{instrument, tracing};
use time::Duration;
use super::errors::{RouterResponse, StorageErrorExt};
use super::{
errors::{RouterResponse, StorageErrorExt},
pm_auth,
};
use crate::{
consts,
core::{
errors::{self, RouterResult},
payments::helpers,
pm_auth as core_pm_auth,
},
routes::{app::StorageInterface, SessionState},
services,
@ -450,6 +452,21 @@ pub async fn add_payment_method_status_update_task(
Ok(())
}
#[cfg(feature = "v2")]
#[instrument(skip_all)]
pub async fn retrieve_payment_method_with_token(
_state: &SessionState,
_merchant_key_store: &domain::MerchantKeyStore,
_token_data: &storage::PaymentTokenData,
_payment_intent: &PaymentIntent,
_card_token_data: Option<&domain::CardToken>,
_customer: &Option<domain::Customer>,
_storage_scheme: common_enums::enums::MerchantStorageScheme,
) -> RouterResult<storage::PaymentMethodDataWithId> {
todo!()
}
#[cfg(feature = "v1")]
#[instrument(skip_all)]
pub async fn retrieve_payment_method_with_token(
state: &SessionState,
@ -562,7 +579,7 @@ pub async fn retrieve_payment_method_with_token(
}
storage::PaymentTokenData::AuthBankDebit(auth_token) => {
core_pm_auth::retrieve_payment_method_from_auth_service(
pm_auth::retrieve_payment_method_from_auth_service(
state,
merchant_key_store,
auth_token,