feat(core): enable payments void for multiple partial capture (#2048)

This commit is contained in:
Hrithikesh
2023-09-11 23:09:36 +05:30
committed by GitHub
parent ffe9009d65
commit a81bfe28ed
15 changed files with 230 additions and 652 deletions

View File

@ -137,6 +137,7 @@ pub struct PaymentAttempt {
pub multiple_capture_count: Option<i16>,
// reference to the payment at connector side
pub connector_response_reference_id: Option<String>,
pub amount_capturable: i64,
}
#[derive(Clone, Debug, Eq, PartialEq)]
@ -192,6 +193,7 @@ pub struct PaymentAttemptNew {
pub error_reason: Option<String>,
pub connector_response_reference_id: Option<String>,
pub multiple_capture_count: Option<i16>,
pub amount_capturable: i64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@ -257,6 +259,7 @@ pub enum PaymentAttemptUpdate {
error_message: Option<Option<String>>,
error_reason: Option<Option<String>>,
connector_response_reference_id: Option<String>,
amount_capturable: Option<i64>,
},
UnresolvedResponseUpdate {
status: storage_enums::AttemptStatus,
@ -277,10 +280,15 @@ pub enum PaymentAttemptUpdate {
error_code: Option<Option<String>>,
error_message: Option<Option<String>>,
error_reason: Option<Option<String>>,
amount_capturable: Option<i64>,
},
MultipleCaptureCountUpdate {
multiple_capture_count: i16,
},
AmountToCaptureUpdate {
status: storage_enums::AttemptStatus,
amount_capturable: i64,
},
PreprocessingUpdate {
status: storage_enums::AttemptStatus,
payment_method_id: Option<Option<String>>,