refactor(payment_attempt_v2): add payment attempt v2 domain and diesel models (#6027)

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-27 18:52:40 +05:30
committed by GitHub
parent 354f5306e7
commit c7bb9ccda3
56 changed files with 2643 additions and 2050 deletions

View File

@ -381,7 +381,7 @@ pub async fn get_mca_from_payment_intent(
let db = &*state.store;
let key_manager_state: &KeyManagerState = &state.into();
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "payment_v2")))]
#[cfg(feature = "v1")]
let payment_attempt = db
.find_payment_attempt_by_attempt_id_merchant_id(
&payment_intent.active_attempt.get_id(),
@ -391,7 +391,7 @@ pub async fn get_mca_from_payment_intent(
.await
.to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;
#[cfg(all(feature = "v2", feature = "payment_v2"))]
#[cfg(feature = "v2")]
let payment_attempt = db
.find_payment_attempt_by_attempt_id_merchant_id(
key_manager_state,