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