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

@ -45,6 +45,7 @@ use crate::{
types::{self, domain, storage, transformers::ForeignTryFrom},
};
#[cfg(feature = "v1")]
pub async fn create_link_token(
state: SessionState,
merchant_account: domain::MerchantAccount,
@ -201,6 +202,16 @@ pub async fn create_link_token(
Ok(ApplicationResponse::Json(response))
}
#[cfg(feature = "v2")]
pub async fn create_link_token(
_state: SessionState,
_merchant_account: domain::MerchantAccount,
_key_store: domain::MerchantKeyStore,
_payload: api_models::pm_auth::LinkTokenCreateRequest,
) -> RouterResponse<api_models::pm_auth::LinkTokenCreateResponse> {
todo!()
}
impl ForeignTryFrom<&types::ConnectorAuthType> for PlaidAuthType {
type Error = errors::ConnectorError;
@ -289,6 +300,7 @@ pub async fn exchange_token_core(
Ok(ApplicationResponse::StatusOk)
}
#[cfg(feature = "v1")]
async fn store_bank_details_in_payment_methods(
key_store: domain::MerchantKeyStore,
payload: api_models::pm_auth::ExchangeTokenCreateRequest,
@ -558,6 +570,19 @@ async fn store_bank_details_in_payment_methods(
Ok(())
}
#[cfg(feature = "v2")]
async fn store_bank_details_in_payment_methods(
_key_store: domain::MerchantKeyStore,
_payload: api_models::pm_auth::ExchangeTokenCreateRequest,
_merchant_account: domain::MerchantAccount,
_state: SessionState,
_bank_account_details_resp: pm_auth_types::BankAccountCredentialsResponse,
_connector_details: (&str, Secret<String>),
_mca_id: common_utils::id_type::MerchantConnectorAccountId,
) -> RouterResult<()> {
todo!()
}
async fn store_in_db(
state: &SessionState,
key_store: &domain::MerchantKeyStore,