mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 11:20:18 +08:00
Improve InvoicePayment() error handling.
This commit is contained in:
@ -169,6 +169,9 @@ func (c *ApiController) InvoicePayment() {
|
||||
id := c.Input().Get("id")
|
||||
|
||||
payment := object.GetPayment(id)
|
||||
c.Data["json"] = wrapActionResponse(object.InvoicePayment(payment))
|
||||
c.ServeJSON()
|
||||
err := object.InvoicePayment(payment)
|
||||
if err != nil {
|
||||
c.ResponseError(err.Error())
|
||||
}
|
||||
c.ResponseOk()
|
||||
}
|
||||
|
Reference in New Issue
Block a user