mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
feat(core): Add support for Void after Capture (#8839)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -78,6 +78,7 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
routes::payments::payments_capture,
|
||||
routes::payments::payments_connector_session,
|
||||
routes::payments::payments_cancel,
|
||||
routes::payments::payments_cancel_post_capture,
|
||||
routes::payments::payments_list,
|
||||
routes::payments::payments_incremental_authorization,
|
||||
routes::payment_link::payment_link_retrieve,
|
||||
@ -536,6 +537,7 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
api_models::payments::SamsungPayTokenData,
|
||||
api_models::payments::ApplepayPaymentMethod,
|
||||
api_models::payments::PaymentsCancelRequest,
|
||||
api_models::payments::PaymentsCancelPostCaptureRequest,
|
||||
api_models::payments::PaymentListConstraints,
|
||||
api_models::payments::PaymentListResponse,
|
||||
api_models::payments::CashappQr,
|
||||
|
||||
@ -812,6 +812,40 @@ pub fn payments_connector_session() {}
|
||||
)]
|
||||
pub fn payments_cancel() {}
|
||||
|
||||
/// Payments - Cancel Post Capture
|
||||
///
|
||||
/// A Payment could can be cancelled when it is in one of these statuses: `succeeded`, `partially_captured`, `partially_captured_and_capturable`.
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/payments/{payment_id}/cancel_post_capture",
|
||||
request_body (
|
||||
content = PaymentsCancelPostCaptureRequest,
|
||||
examples(
|
||||
(
|
||||
"Cancel the payment post capture with minimal fields" = (
|
||||
value = json!({})
|
||||
)
|
||||
),
|
||||
(
|
||||
"Cancel the payment post capture with cancellation reason" = (
|
||||
value = json!({"cancellation_reason": "requested_by_customer"})
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
params(
|
||||
("payment_id" = String, Path, description = "The identifier for payment")
|
||||
),
|
||||
responses(
|
||||
(status = 200, description = "Payment canceled post capture"),
|
||||
(status = 400, description = "Missing mandatory fields", body = GenericErrorResponseOpenApi)
|
||||
),
|
||||
tag = "Payments",
|
||||
operation_id = "Cancel a Payment Post Capture",
|
||||
security(("api_key" = []))
|
||||
)]
|
||||
pub fn payments_cancel_post_capture() {}
|
||||
|
||||
/// Payments - List
|
||||
///
|
||||
/// To list the *payments*
|
||||
|
||||
Reference in New Issue
Block a user