+Pay4Order
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"net/http"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/wxpay"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
|
||||
@@ -13,8 +15,14 @@ type WXPayController struct {
|
||||
|
||||
func (c *WXPayController) Msg() {
|
||||
if c.Ctx.Input.Method() == http.MethodPost {
|
||||
var callbackResponse *wxpay.CallbackResponse
|
||||
|
||||
msg, callbackResponse := api.WxpayAPI.GetCallbackMsg(c.Ctx.Request)
|
||||
if callbackResponse == nil {
|
||||
if err := localjx.OnWxPayCallback(msg); err != nil {
|
||||
if msg.MsgType != wxpay.MsgTypeUnkown {
|
||||
callbackResponse = wxpay.Err2CallbackResponse(err, "")
|
||||
}
|
||||
}
|
||||
}
|
||||
if callbackResponse == nil {
|
||||
callbackResponse = wxpay.SuccessResponse
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user