mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 13:30:39 +08:00
db: Added Reverse lookup table (#147)
This commit is contained in:
@ -323,7 +323,7 @@ pub fn create_startpay_url(
|
||||
server.base_url,
|
||||
payment_intent.payment_id,
|
||||
payment_intent.merchant_id,
|
||||
payment_attempt.txn_id
|
||||
payment_attempt.attempt_id
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ impl<F: Send + Clone> GetTracker<F, PaymentData<F>, api::PaymentsCancelRequest>
|
||||
.find_connector_response_by_payment_id_merchant_id_txn_id(
|
||||
&payment_attempt.payment_id,
|
||||
&payment_attempt.merchant_id,
|
||||
&payment_attempt.txn_id,
|
||||
&payment_attempt.attempt_id,
|
||||
storage_scheme,
|
||||
)
|
||||
.await
|
||||
|
||||
@ -89,7 +89,7 @@ impl<F: Send + Clone> GetTracker<F, payments::PaymentData<F>, api::PaymentsCaptu
|
||||
.find_connector_response_by_payment_id_merchant_id_txn_id(
|
||||
&payment_attempt.payment_id,
|
||||
&payment_attempt.merchant_id,
|
||||
&payment_attempt.txn_id,
|
||||
&payment_attempt.attempt_id,
|
||||
storage_scheme,
|
||||
)
|
||||
.await
|
||||
|
||||
@ -97,7 +97,7 @@ impl<F: Send + Clone> GetTracker<F, PaymentData<F>, api::PaymentsRequest> for Pa
|
||||
.find_connector_response_by_payment_id_merchant_id_txn_id(
|
||||
&payment_attempt.payment_id,
|
||||
&payment_attempt.merchant_id,
|
||||
&payment_attempt.txn_id,
|
||||
&payment_attempt.attempt_id,
|
||||
storage_scheme,
|
||||
)
|
||||
.await
|
||||
|
||||
@ -434,7 +434,7 @@ impl PaymentCreate {
|
||||
storage::PaymentAttemptNew {
|
||||
payment_id: payment_id.to_string(),
|
||||
merchant_id: merchant_id.to_string(),
|
||||
txn_id: Uuid::new_v4().to_string(),
|
||||
attempt_id: Uuid::new_v4().to_string(),
|
||||
status,
|
||||
amount: amount.into(),
|
||||
currency,
|
||||
@ -495,7 +495,7 @@ impl PaymentCreate {
|
||||
storage::ConnectorResponseNew {
|
||||
payment_id: payment_attempt.payment_id.clone(),
|
||||
merchant_id: payment_attempt.merchant_id.clone(),
|
||||
txn_id: payment_attempt.txn_id.clone(),
|
||||
txn_id: payment_attempt.attempt_id.clone(),
|
||||
created_at: payment_attempt.created_at,
|
||||
modified_at: payment_attempt.modified_at,
|
||||
connector_name: payment_attempt.connector.clone(),
|
||||
|
||||
@ -285,7 +285,7 @@ impl PaymentMethodValidate {
|
||||
storage::PaymentAttemptNew {
|
||||
payment_id: payment_id.to_string(),
|
||||
merchant_id: merchant_id.to_string(),
|
||||
txn_id: Uuid::new_v4().to_string(),
|
||||
attempt_id: Uuid::new_v4().to_string(),
|
||||
status,
|
||||
// Amount & Currency will be zero in this case
|
||||
amount: 0,
|
||||
|
||||
@ -106,7 +106,7 @@ impl<F: Send + Clone> GetTracker<F, PaymentData<F>, api::PaymentsSessionRequest>
|
||||
.find_connector_response_by_payment_id_merchant_id_txn_id(
|
||||
&payment_intent.payment_id,
|
||||
&payment_intent.merchant_id,
|
||||
&payment_attempt.txn_id,
|
||||
&payment_attempt.attempt_id,
|
||||
storage_scheme,
|
||||
)
|
||||
.await
|
||||
|
||||
@ -103,7 +103,7 @@ impl<F: Send + Clone> GetTracker<F, PaymentData<F>, api::PaymentsStartRequest> f
|
||||
.find_connector_response_by_payment_id_merchant_id_txn_id(
|
||||
&payment_intent.payment_id,
|
||||
&payment_intent.merchant_id,
|
||||
&payment_attempt.txn_id,
|
||||
&payment_attempt.attempt_id,
|
||||
storage_scheme,
|
||||
)
|
||||
.await
|
||||
|
||||
@ -215,8 +215,8 @@ async fn get_tracker_for_sync<
|
||||
api::PaymentIdType::ConnectorTransactionId(ref id) => {
|
||||
db.find_payment_attempt_by_merchant_id_connector_txn_id(merchant_id, id, storage_scheme)
|
||||
}
|
||||
api::PaymentIdType::PaymentTxnId(ref id) => {
|
||||
db.find_payment_attempt_by_merchant_id_txn_id(merchant_id, id, storage_scheme)
|
||||
api::PaymentIdType::PaymentAttemptId(ref id) => {
|
||||
db.find_payment_attempt_by_merchant_id_attempt_id(merchant_id, id, storage_scheme)
|
||||
}
|
||||
}
|
||||
.await
|
||||
@ -233,7 +233,7 @@ async fn get_tracker_for_sync<
|
||||
.find_connector_response_by_payment_id_merchant_id_txn_id(
|
||||
&payment_intent.payment_id,
|
||||
&payment_intent.merchant_id,
|
||||
&payment_attempt.txn_id,
|
||||
&payment_attempt.attempt_id,
|
||||
storage_scheme,
|
||||
)
|
||||
.await
|
||||
|
||||
@ -116,7 +116,7 @@ impl<F: Send + Clone> GetTracker<F, PaymentData<F>, api::PaymentsRequest> for Pa
|
||||
.find_connector_response_by_payment_id_merchant_id_txn_id(
|
||||
&payment_intent.payment_id,
|
||||
&payment_intent.merchant_id,
|
||||
&payment_attempt.txn_id,
|
||||
&payment_attempt.attempt_id,
|
||||
storage_scheme,
|
||||
)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user