mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 05:17:02 +08:00
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:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user