refactor(core): remove connector response table and use payment_attempt instead (#2644)

This commit is contained in:
Abhishek Marrivagu
2023-11-09 20:39:12 +05:30
committed by GitHub
parent e67e808d70
commit 966369b6f2
35 changed files with 152 additions and 976 deletions

View File

@ -1,5 +0,0 @@
use diesel_models::connector_response::ConnectorResponse;
use crate::redis::kv_store::KvStorePartition;
impl KvStorePartition for ConnectorResponse {}

View File

@ -8,7 +8,6 @@ use redis::{kv_store::RedisConnInterface, RedisStore};
mod address;
pub mod config;
pub mod connection;
mod connector_response;
pub mod database;
pub mod errors;
mod lookup;

View File

@ -27,7 +27,6 @@ pub struct MockDb {
pub customers: Arc<Mutex<Vec<store::Customer>>>,
pub refunds: Arc<Mutex<Vec<store::Refund>>>,
pub processes: Arc<Mutex<Vec<store::ProcessTracker>>>,
pub connector_response: Arc<Mutex<Vec<store::ConnectorResponse>>>,
pub redis: Arc<RedisStore>,
pub api_keys: Arc<Mutex<Vec<store::ApiKey>>>,
pub ephemeral_keys: Arc<Mutex<Vec<store::EphemeralKey>>>,
@ -57,7 +56,6 @@ impl MockDb {
customers: Default::default(),
refunds: Default::default(),
processes: Default::default(),
connector_response: Default::default(),
redis: Arc::new(
RedisStore::new(redis)
.await

View File

@ -1062,7 +1062,6 @@ impl DataModelExt for PaymentAttemptNew {
connector_response_reference_id: self.connector_response_reference_id,
multiple_capture_count: self.multiple_capture_count,
amount_capturable: self.amount_capturable,
updated_by: self.updated_by,
authentication_data: self.authentication_data,
encoded_data: self.encoded_data,
@ -1244,6 +1243,8 @@ impl DataModelExt for PaymentAttemptUpdate {
connector_response_reference_id,
amount_capturable,
updated_by,
authentication_data,
encoded_data,
} => DieselPaymentAttemptUpdate::ResponseUpdate {
status,
connector,
@ -1259,6 +1260,8 @@ impl DataModelExt for PaymentAttemptUpdate {
connector_response_reference_id,
amount_capturable,
updated_by,
authentication_data,
encoded_data,
},
Self::UnresolvedResponseUpdate {
status,
@ -1481,6 +1484,8 @@ impl DataModelExt for PaymentAttemptUpdate {
connector_response_reference_id,
amount_capturable,
updated_by,
authentication_data,
encoded_data,
} => Self::ResponseUpdate {
status,
connector,
@ -1496,6 +1501,8 @@ impl DataModelExt for PaymentAttemptUpdate {
connector_response_reference_id,
amount_capturable,
updated_by,
authentication_data,
encoded_data,
},
DieselPaymentAttemptUpdate::UnresolvedResponseUpdate {
status,