feat(payout): add unified error code and messages along with translation (#5810)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Kashif
2024-09-19 18:55:12 +05:30
committed by GitHub
parent 8320dc07fe
commit a0f4bb771b
24 changed files with 605 additions and 80 deletions

View File

@ -84,6 +84,8 @@ impl<T: DatabaseStore> PayoutAttemptInterface for KVRouterStore<T> {
profile_id: new_payout_attempt.profile_id.clone(),
merchant_connector_id: new_payout_attempt.merchant_connector_id.clone(),
routing_info: new_payout_attempt.routing_info.clone(),
unified_code: new_payout_attempt.unified_code.clone(),
unified_message: new_payout_attempt.unified_message.clone(),
};
let redis_entry = kv::TypedSql {
@ -525,6 +527,8 @@ impl DataModelExt for PayoutAttempt {
profile_id: self.profile_id,
merchant_connector_id: self.merchant_connector_id,
routing_info: self.routing_info,
unified_code: self.unified_code,
unified_message: self.unified_message,
}
}
@ -549,6 +553,8 @@ impl DataModelExt for PayoutAttempt {
profile_id: storage_model.profile_id,
merchant_connector_id: storage_model.merchant_connector_id,
routing_info: storage_model.routing_info,
unified_code: storage_model.unified_code,
unified_message: storage_model.unified_message,
}
}
}
@ -576,6 +582,8 @@ impl DataModelExt for PayoutAttemptNew {
profile_id: self.profile_id,
merchant_connector_id: self.merchant_connector_id,
routing_info: self.routing_info,
unified_code: self.unified_code,
unified_message: self.unified_message,
}
}
@ -600,6 +608,8 @@ impl DataModelExt for PayoutAttemptNew {
profile_id: storage_model.profile_id,
merchant_connector_id: storage_model.merchant_connector_id,
routing_info: storage_model.routing_info,
unified_code: storage_model.unified_code,
unified_message: storage_model.unified_message,
}
}
}
@ -613,12 +623,16 @@ impl DataModelExt for PayoutAttemptUpdate {
error_message,
error_code,
is_eligible,
unified_code,
unified_message,
} => DieselPayoutAttemptUpdate::StatusUpdate {
connector_payout_id,
status,
error_message,
error_code,
is_eligible,
unified_code,
unified_message,
},
Self::PayoutTokenUpdate { payout_token } => {
DieselPayoutAttemptUpdate::PayoutTokenUpdate { payout_token }