Skip to content

Commit 84d04e4

Browse files
committed
refactor
1 parent 0277d4d commit 84d04e4

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

crates/api_models/src/payments.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7637,6 +7637,7 @@ pub struct PaymentsCancelRequest {
76377637
pub merchant_connector_details: Option<admin::MerchantConnectorDetailsWrap>,
76387638
}
76397639

7640+
/// Request to cancel a payment when the payment is already captured
76407641
#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
76417642
pub struct PaymentsCancelPostCaptureRequest {
76427643
/// The identifier for the payment

crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pub enum OperationId {
7979
Auth,
8080
Capture,
8181
Void,
82-
// VoidPC
82+
// VoidPostCapture
8383
VoidPC,
8484
Refund,
8585
}
@@ -2613,7 +2613,7 @@ pub enum WorldpayvantivPaymentFlow {
26132613
Auth,
26142614
Capture,
26152615
Void,
2616-
//VoidPC
2616+
//VoidPostCapture
26172617
VoidPC,
26182618
}
26192619

crates/openapi/src/routes/payments.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ pub fn payments_cancel() {}
814814

815815
/// Payments - Cancel Post Capture
816816
///
817-
/// A Payment could can be cancelled when it is in one of these statuses: `requires_payment_method`, `requires_capture`, `requires_confirmation`, `requires_customer_action`.
817+
/// A Payment could can be cancelled when it is in one of these statuses: `succeeded`, `partially_captured`, `partially_captured_and_capturable`.
818818
#[utoipa::path(
819819
post,
820820
path = "/payments/{payment_id}/cancel_post_capture",
@@ -837,7 +837,7 @@ pub fn payments_cancel() {}
837837
("payment_id" = String, Path, description = "The identifier for payment")
838838
),
839839
responses(
840-
(status = 200, description = "Payment canceled"),
840+
(status = 200, description = "Payment canceled post capture"),
841841
(status = 400, description = "Missing mandatory fields", body = GenericErrorResponseOpenApi)
842842
),
843843
tag = "Payments",

crates/router/src/core/payments.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6912,7 +6912,6 @@ where
69126912
payment_data.get_payment_intent().status,
69136913
storage_enums::IntentStatus::RequiresCapture
69146914
),
6915-
69166915
_ => false,
69176916
}
69186917
}

crates/router_derive/src/macros/operation.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ impl Conversion {
9292
Derives::SyncData => syn::Ident::new("PaymentsSyncData", Span::call_site()),
9393
Derives::Cancel => syn::Ident::new("PaymentsCancelRequest", Span::call_site()),
9494
Derives::CancelData => syn::Ident::new("PaymentsCancelData", Span::call_site()),
95-
9695
Derives::ApproveData => syn::Ident::new("PaymentsApproveData", Span::call_site()),
9796
Derives::Reject => syn::Ident::new("PaymentsRejectRequest", Span::call_site()),
9897
Derives::RejectData => syn::Ident::new("PaymentsRejectData", Span::call_site()),

0 commit comments

Comments
 (0)