Add alipay provider.

This commit is contained in:
Yang Luo
2022-03-06 22:46:02 +08:00
parent 0e40a1d922
commit bf5d4eea48
17 changed files with 296 additions and 9 deletions

View File

@ -114,3 +114,20 @@ func (c *ApiController) DeletePayment() {
c.Data["json"] = wrapActionResponse(object.DeletePayment(&payment))
c.ServeJSON()
}
// @Title NotifyPayment
// @Tag Payment API
// @Description notify payment
// @Param body body object.Payment true "The details of the payment"
// @Success 200 {object} controllers.Response The Response object
// @router /notify-payment [post]
func (c *ApiController) NotifyPayment() {
var payment object.Payment
err := json.Unmarshal(c.Ctx.Input.RequestBody, &payment)
if err != nil {
panic(err)
}
c.Data["json"] = wrapActionResponse(object.NotifyPayment("111", "222"))
c.ServeJSON()
}