refactor(payment_id): add payment id domain type (#5738)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Narayan Bhat
2024-09-02 09:21:33 +05:30
committed by GitHub
parent 4b0564e0e8
commit 7296cceba3
150 changed files with 880 additions and 803 deletions

View File

@ -73,7 +73,7 @@ impl ConstructFlowSpecificData<frm_api::Checkout, FraudCheckCheckoutData, FraudC
merchant_id: merchant_account.get_id().clone(),
customer_id,
connector: connector_id.to_string(),
payment_id: self.payment_intent.payment_id.clone(),
payment_id: self.payment_intent.payment_id.get_string_repr().to_owned(),
attempt_id: self.payment_attempt.attempt_id.clone(),
status,
payment_method: self

View File

@ -58,7 +58,7 @@ pub async fn construct_fulfillment_router_data<'a>(
flow: std::marker::PhantomData,
merchant_id: merchant_account.get_id().clone(),
connector,
payment_id: payment_attempt.payment_id.clone(),
payment_id: payment_attempt.payment_id.get_string_repr().to_owned(),
attempt_id: payment_attempt.attempt_id.clone(),
status: payment_attempt.status,
payment_method,

View File

@ -69,7 +69,7 @@ impl ConstructFlowSpecificData<RecordReturn, FraudCheckRecordReturnData, FraudCh
merchant_id: merchant_account.get_id().clone(),
customer_id,
connector: connector_id.to_string(),
payment_id: self.payment_intent.payment_id.clone(),
payment_id: self.payment_intent.payment_id.get_string_repr().to_owned(),
attempt_id: self.payment_attempt.attempt_id.clone(),
status,
payment_method: utils::OptionExt::get_required_value(

View File

@ -65,7 +65,7 @@ impl ConstructFlowSpecificData<frm_api::Sale, FraudCheckSaleData, FraudCheckResp
merchant_id: merchant_account.get_id().clone(),
customer_id,
connector: connector_id.to_string(),
payment_id: self.payment_intent.payment_id.clone(),
payment_id: self.payment_intent.payment_id.get_string_repr().to_owned(),
attempt_id: self.payment_attempt.attempt_id.clone(),
status,
payment_method: self

View File

@ -77,7 +77,7 @@ impl
merchant_id: merchant_account.get_id().clone(),
customer_id,
connector: connector_id.to_string(),
payment_id: self.payment_intent.payment_id.clone(),
payment_id: self.payment_intent.payment_id.get_string_repr().to_owned(),
attempt_id: self.payment_attempt.attempt_id.clone(),
status,
payment_method: self

View File

@ -166,7 +166,7 @@ impl<F: Send + Clone> Domain<F> for FraudCheckPost {
Ok(Some(FrmRouterData {
merchant_id: router_data.merchant_id,
connector: router_data.connector,
payment_id: router_data.payment_id,
payment_id: router_data.payment_id.clone(),
attempt_id: router_data.attempt_id,
request: FrmRequest::Sale(FraudCheckSaleData {
amount: router_data.request.amount,

View File

@ -175,7 +175,7 @@ impl<F: Send + Clone> Domain<F> for FraudCheckPre {
Ok(Some(FrmRouterData {
merchant_id: router_data.merchant_id,
connector: router_data.connector,
payment_id: router_data.payment_id,
payment_id: router_data.payment_id.clone(),
attempt_id: router_data.attempt_id,
request: FrmRequest::Transaction(FraudCheckTransactionData {
amount: router_data.request.amount,
@ -213,7 +213,7 @@ impl<F: Send + Clone> Domain<F> for FraudCheckPre {
Ok(FrmRouterData {
merchant_id: router_data.merchant_id,
connector: router_data.connector,
payment_id: router_data.payment_id,
payment_id: router_data.payment_id.clone(),
attempt_id: router_data.attempt_id,
request: FrmRequest::Checkout(FraudCheckCheckoutData {
amount: router_data.request.amount,

View File

@ -23,7 +23,7 @@ use crate::types::{
#[derive(Clone, Default, Debug)]
pub struct PaymentIntentCore {
pub payment_id: String,
pub payment_id: common_utils::id_type::PaymentId,
}
#[derive(Clone, Debug)]