|
696 | 696 | // So set the amount capturable to zero
|
697 | 697 | common_enums::IntentStatus::Succeeded
|
698 | 698 | | common_enums::IntentStatus::Failed
|
699 |
| - | common_enums::IntentStatus::Cancelled => Some(MinorUnit::zero()), |
| 699 | + | common_enums::IntentStatus::Cancelled |
| 700 | + | common_enums::IntentStatus::Conflicted => Some(MinorUnit::zero()), |
700 | 701 | // For these statuses, update the capturable amount when it reaches terminal / capturable state
|
701 | 702 | common_enums::IntentStatus::RequiresCustomerAction
|
702 | 703 | | common_enums::IntentStatus::RequiresMerchantAction
|
|
726 | 727 | match intent_status {
|
727 | 728 | // If the status is succeeded then we have captured the whole amount
|
728 | 729 | // we need not check for `amount_to_capture` here because passing `amount_to_capture` when authorizing is not supported
|
729 |
| - common_enums::IntentStatus::Succeeded => { |
| 730 | + common_enums::IntentStatus::Succeeded | common_enums::IntentStatus::Conflicted => { |
730 | 731 | let total_amount = payment_data.payment_attempt.amount_details.get_net_amount();
|
731 | 732 | Some(total_amount)
|
732 | 733 | }
|
|
912 | 913 | // If the status is already succeeded / failed we cannot capture any more amount
|
913 | 914 | common_enums::IntentStatus::Succeeded
|
914 | 915 | | common_enums::IntentStatus::Failed
|
915 |
| - | common_enums::IntentStatus::Cancelled => Some(MinorUnit::zero()), |
| 916 | + | common_enums::IntentStatus::Cancelled |
| 917 | + | common_enums::IntentStatus::Conflicted => Some(MinorUnit::zero()), |
916 | 918 | // For these statuses, update the capturable amount when it reaches terminal / capturable state
|
917 | 919 | common_enums::IntentStatus::RequiresCustomerAction
|
918 | 920 | | common_enums::IntentStatus::RequiresMerchantAction
|
|
938 | 940 | let intent_status = common_enums::IntentStatus::from(self.status);
|
939 | 941 | match intent_status {
|
940 | 942 | // If the status is succeeded then we have captured the whole amount
|
941 |
| - common_enums::IntentStatus::Succeeded => { |
| 943 | + common_enums::IntentStatus::Succeeded | common_enums::IntentStatus::Conflicted => { |
942 | 944 | let amount_to_capture = payment_data
|
943 | 945 | .payment_attempt
|
944 | 946 | .amount_details
|
@@ -1153,7 +1155,8 @@ impl
|
1153 | 1155 | // If the status is already succeeded / failed we cannot capture any more amount
|
1154 | 1156 | common_enums::IntentStatus::Succeeded
|
1155 | 1157 | | common_enums::IntentStatus::Failed
|
1156 |
| - | common_enums::IntentStatus::Cancelled => Some(MinorUnit::zero()), |
| 1158 | + | common_enums::IntentStatus::Cancelled |
| 1159 | + | common_enums::IntentStatus::Conflicted => Some(MinorUnit::zero()), |
1157 | 1160 | // For these statuses, update the capturable amount when it reaches terminal / capturable state
|
1158 | 1161 | common_enums::IntentStatus::RequiresCustomerAction
|
1159 | 1162 | | common_enums::IntentStatus::RequiresMerchantAction
|
@@ -1181,7 +1184,7 @@ impl
|
1181 | 1184 | let intent_status = common_enums::IntentStatus::from(self.status);
|
1182 | 1185 | match intent_status {
|
1183 | 1186 | // If the status is succeeded then we have captured the whole amount or amount_to_capture
|
1184 |
| - common_enums::IntentStatus::Succeeded => { |
| 1187 | + common_enums::IntentStatus::Succeeded | common_enums::IntentStatus::Conflicted => { |
1185 | 1188 | let amount_to_capture = payment_attempt.amount_details.get_amount_to_capture();
|
1186 | 1189 |
|
1187 | 1190 | let amount_captured =
|
@@ -1385,7 +1388,8 @@ impl
|
1385 | 1388 | // So set the amount capturable to zero
|
1386 | 1389 | common_enums::IntentStatus::Succeeded
|
1387 | 1390 | | common_enums::IntentStatus::Failed
|
1388 |
| - | common_enums::IntentStatus::Cancelled => Some(MinorUnit::zero()), |
| 1391 | + | common_enums::IntentStatus::Cancelled |
| 1392 | + | common_enums::IntentStatus::Conflicted => Some(MinorUnit::zero()), |
1389 | 1393 | // For these statuses, update the capturable amount when it reaches terminal / capturable state
|
1390 | 1394 | common_enums::IntentStatus::RequiresCustomerAction
|
1391 | 1395 | | common_enums::IntentStatus::RequiresMerchantAction
|
@@ -1415,7 +1419,7 @@ impl
|
1415 | 1419 | match intent_status {
|
1416 | 1420 | // If the status is succeeded then we have captured the whole amount
|
1417 | 1421 | // we need not check for `amount_to_capture` here because passing `amount_to_capture` when authorizing is not supported
|
1418 |
| - common_enums::IntentStatus::Succeeded => { |
| 1422 | + common_enums::IntentStatus::Succeeded | common_enums::IntentStatus::Conflicted => { |
1419 | 1423 | let total_amount = payment_data.payment_attempt.amount_details.get_net_amount();
|
1420 | 1424 | Some(total_amount)
|
1421 | 1425 | }
|
|
0 commit comments