mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 11:20:18 +08:00
Add InvoicePayment() API.
This commit is contained in:
@ -158,3 +158,17 @@ func (c *ApiController) NotifyPayment() {
|
||||
panic(fmt.Errorf("NotifyPayment() failed: %v", ok))
|
||||
}
|
||||
}
|
||||
|
||||
// @Title InvoicePayment
|
||||
// @Tag Payment API
|
||||
// @Description invoice payment
|
||||
// @Param id query string true "The id of the payment"
|
||||
// @Success 200 {object} controllers.Response The Response object
|
||||
// @router /invoice-payment [post]
|
||||
func (c *ApiController) InvoicePayment() {
|
||||
id := c.Input().Get("id")
|
||||
|
||||
payment := object.GetPayment(id)
|
||||
c.Data["json"] = wrapActionResponse(object.InvoicePayment(payment))
|
||||
c.ServeJSON()
|
||||
}
|
||||
|
Reference in New Issue
Block a user