feat(router): add unified_code, unified_message in payments response (#2918)

This commit is contained in:
Sai Harsha Vardhan
2023-11-20 17:35:07 +05:30
committed by GitHub
parent efeebc0f23
commit 39540015fd
20 changed files with 242 additions and 45 deletions

View File

@ -364,6 +364,8 @@ impl<T: DatabaseStore> PaymentAttemptInterface for KVRouterStore<T> {
authentication_data: payment_attempt.authentication_data.clone(),
encoded_data: payment_attempt.encoded_data.clone(),
merchant_connector_id: payment_attempt.merchant_connector_id.clone(),
unified_code: payment_attempt.unified_code.clone(),
unified_message: payment_attempt.unified_message.clone(),
};
let field = format!("pa_{}", created_attempt.attempt_id);
@ -966,6 +968,8 @@ impl DataModelExt for PaymentAttempt {
authentication_data: self.authentication_data,
encoded_data: self.encoded_data,
merchant_connector_id: self.merchant_connector_id,
unified_code: self.unified_code,
unified_message: self.unified_message,
}
}
@ -1018,6 +1022,8 @@ impl DataModelExt for PaymentAttempt {
authentication_data: storage_model.authentication_data,
encoded_data: storage_model.encoded_data,
merchant_connector_id: storage_model.merchant_connector_id,
unified_code: storage_model.unified_code,
unified_message: storage_model.unified_message,
}
}
}
@ -1070,6 +1076,8 @@ impl DataModelExt for PaymentAttemptNew {
authentication_data: self.authentication_data,
encoded_data: self.encoded_data,
merchant_connector_id: self.merchant_connector_id,
unified_code: self.unified_code,
unified_message: self.unified_message,
}
}
@ -1120,6 +1128,8 @@ impl DataModelExt for PaymentAttemptNew {
authentication_data: storage_model.authentication_data,
encoded_data: storage_model.encoded_data,
merchant_connector_id: storage_model.merchant_connector_id,
unified_code: storage_model.unified_code,
unified_message: storage_model.unified_message,
}
}
}
@ -1255,6 +1265,8 @@ impl DataModelExt for PaymentAttemptUpdate {
tax_amount,
authentication_data,
encoded_data,
unified_code,
unified_message,
} => DieselPaymentAttemptUpdate::ResponseUpdate {
status,
connector,
@ -1274,6 +1286,8 @@ impl DataModelExt for PaymentAttemptUpdate {
tax_amount,
authentication_data,
encoded_data,
unified_code,
unified_message,
},
Self::UnresolvedResponseUpdate {
status,
@ -1307,6 +1321,8 @@ impl DataModelExt for PaymentAttemptUpdate {
error_reason,
amount_capturable,
updated_by,
unified_code,
unified_message,
} => DieselPaymentAttemptUpdate::ErrorUpdate {
connector,
status,
@ -1315,6 +1331,8 @@ impl DataModelExt for PaymentAttemptUpdate {
error_reason,
amount_capturable,
updated_by,
unified_code,
unified_message,
},
Self::MultipleCaptureCountUpdate {
multiple_capture_count,
@ -1504,6 +1522,8 @@ impl DataModelExt for PaymentAttemptUpdate {
tax_amount,
authentication_data,
encoded_data,
unified_code,
unified_message,
} => Self::ResponseUpdate {
status,
connector,
@ -1523,6 +1543,8 @@ impl DataModelExt for PaymentAttemptUpdate {
tax_amount,
authentication_data,
encoded_data,
unified_code,
unified_message,
},
DieselPaymentAttemptUpdate::UnresolvedResponseUpdate {
status,
@ -1556,6 +1578,8 @@ impl DataModelExt for PaymentAttemptUpdate {
error_reason,
amount_capturable,
updated_by,
unified_code,
unified_message,
} => Self::ErrorUpdate {
connector,
status,
@ -1564,6 +1588,8 @@ impl DataModelExt for PaymentAttemptUpdate {
error_reason,
amount_capturable,
updated_by,
unified_code,
unified_message,
},
DieselPaymentAttemptUpdate::MultipleCaptureCountUpdate {
multiple_capture_count,