payOrder

@Patch(value = "{id}/pay")
open override fun payOrder(@PathVariable id: String): HttpResponse<PayOrderResponse>

Handles GET orders/{id}/pay.

Translates the application-layer result into an HTTP response:

  • 200 OK if the order is successfully marked as paid

  • 400 Bad Request if the order is already paid

  • 404 Not Found if the order does not exist

Return

An HTTP response indicating the payment result.

Parameters

id

The order identifier received from the path.