微信支付退款
This commit is contained in:
@@ -74,9 +74,15 @@ func (c *OrderManager) OnOrderNew(order *model.GoodsOrder, orderStatus *model.Or
|
||||
if order.Status == model.OrderStatusUnknown {
|
||||
order.Status = model.OrderStatusNew
|
||||
}
|
||||
isDuplicated, err := addOrderOrWaybillStatus(orderStatus, db)
|
||||
if err == nil && !isDuplicated {
|
||||
isDuplicated, err = c.SaveOrder(order, false, db)
|
||||
|
||||
var isDuplicated bool
|
||||
if order.Status == model.OrderStatusNew && order.VendorID == model.VendorIDJX && !model.IsOrderJXTemp(order) {
|
||||
isDuplicated, _, err = c.addOrderStatus(orderStatus, db)
|
||||
} else {
|
||||
isDuplicated, err = addOrderOrWaybillStatus(orderStatus, db)
|
||||
if err == nil && !isDuplicated {
|
||||
isDuplicated, err = c.SaveOrder(order, false, db)
|
||||
}
|
||||
}
|
||||
if err == nil {
|
||||
dao.Commit(db)
|
||||
@@ -268,7 +274,6 @@ func (c *OrderManager) SaveOrder(order *model.GoodsOrder, isAdjust bool, db *dao
|
||||
}
|
||||
|
||||
order.ConsigneeName = utils.LimitUTF8StringLen(order.ConsigneeName, 32)
|
||||
// globals.SugarLogger.Debugf("saveOrder isAdjust:%t, order:%v", isAdjust, order)
|
||||
created, _, err2 := db.Db.ReadOrCreate(order, "VendorOrderID", "VendorID")
|
||||
if err = err2; err == nil {
|
||||
originalOrder := &model.GoodsOrderOriginal{
|
||||
|
||||
@@ -13,7 +13,7 @@ const (
|
||||
|
||||
PayStatusNo = 0
|
||||
PayStatusYes = 1
|
||||
PayStatusRefund = 2
|
||||
PayStatusFailed = 2
|
||||
)
|
||||
|
||||
type ModelTimeInfo struct {
|
||||
@@ -278,11 +278,13 @@ type OrderPay struct {
|
||||
Status int `json:"status"`
|
||||
PayCreatedAt time.Time `orm:"type(datetime);index" json:"payCreatedAt"`
|
||||
PayFinishedAt *time.Time `orm:"type(datetime);null" json:"payFinishedAt"`
|
||||
TotalFee int `json:"totalFee"`
|
||||
|
||||
PrepayID string `orm:"column(prepay_id);unique;size(48)" json:"prepayID"`
|
||||
CodeURL string `orm:"column(code_url);size(256)" json:"codeURL"`
|
||||
PayOrderID string `orm:"column(pay_order_id);size(48)" json:"payOrderID"`
|
||||
OriginalData string `orm:"type(text)" json:"-"`
|
||||
TransactionID string `orm:"column(transaction_id);index;size(48)" json:"transactionID"`
|
||||
PrepayID string `orm:"column(prepay_id);unique;size(48)" json:"prepayID"`
|
||||
CodeURL string `orm:"column(code_url);size(256)" json:"codeURL"`
|
||||
PayOrderID string `orm:"column(pay_order_id);size(48)" json:"payOrderID"`
|
||||
OriginalData string `orm:"type(text)" json:"-"`
|
||||
}
|
||||
|
||||
func (v *OrderPay) TableIndex() [][]string {
|
||||
@@ -291,6 +293,24 @@ func (v *OrderPay) TableIndex() [][]string {
|
||||
}
|
||||
}
|
||||
|
||||
type OrderPayRefund struct {
|
||||
ModelIDCULD
|
||||
|
||||
RefundID string `orm:"column(refund_id);unique;size(48)" json:"refundID"`
|
||||
VendorRefundID string `orm:"column(vendor_refund_id);unique;size(48)" json:"vendorRefundID"`
|
||||
|
||||
AfsOrderID string `orm:"column(afs_order_id);index;size(48)" json:"afsOrderID"`
|
||||
VendorOrderID string `orm:"column(vendor_order_id);index;size(48)" json:"vendorOrderID"`
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
TransactionID string `orm:"column(transaction_id);index;size(48)" json:"transactionID"`
|
||||
Status int `json:"status"`
|
||||
RefundCreatedAt time.Time `orm:"type(datetime);index" json:"payCreatedAt"`
|
||||
RefundFinishedAt *time.Time `orm:"type(datetime);null" json:"payFinishedAt"`
|
||||
RefundFee int `json:"refundFee"`
|
||||
|
||||
OriginalData string `orm:"type(text)" json:"-"`
|
||||
}
|
||||
|
||||
// 判断是否是购买平台自有物流
|
||||
// 对于京东,饿百来说,就是其自有的物流,对于微商城来说,是达达
|
||||
func IsWaybillPlatformOwn(bill *Waybill) bool {
|
||||
@@ -318,11 +338,9 @@ func IsOrderDeliveryByPlatform(order *GoodsOrder) bool {
|
||||
}
|
||||
|
||||
func IsOrderJXTemp(order *GoodsOrder) bool {
|
||||
// return order.Flag&OrderFlagMaskTempJX != 0
|
||||
return true
|
||||
return order.VendorID == VendorIDJX && order.Flag&OrderFlagMaskTempJX != 0
|
||||
}
|
||||
|
||||
func IsAfsOrderJXTemp(order *AfsOrder) bool {
|
||||
// return order.Flag&OrderFlagMaskTempJX != 0
|
||||
return true
|
||||
return order.VendorID == VendorIDJX && order.Flag&OrderFlagMaskTempJX != 0
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -79,6 +80,8 @@ func Pay4Order(ctx *jxcontext.Context, orderID int64, payType int, vendorPayType
|
||||
switch payType {
|
||||
case model.PayTypeWX:
|
||||
orderPay, err = pay4OrderByWX(ctx, order, vendorPayType)
|
||||
dao.WrapAddIDCULDEntity(orderPay, ctx.GetUserName())
|
||||
err = dao.CreateEntity(dao.GetDB(), orderPay)
|
||||
default:
|
||||
err = fmt.Errorf("支付方式:%d当前不支持", payType)
|
||||
}
|
||||
@@ -93,13 +96,13 @@ func OnPayFinished(orderPay *model.OrderPay) (err error) {
|
||||
dao.UpdateEntity(db, orderPay)
|
||||
order.Status = model.OrderStatusNew
|
||||
order.StatusTime = *orderPay.PayFinishedAt
|
||||
// OnOrderNew逻辑需要修改
|
||||
// err = partner.CurOrderManager.OnOrderNew(order, model.Order2Status(order))
|
||||
err = partner.CurOrderManager.OnOrderNew(order, model.Order2Status(order))
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func GenOrderNo(ctx *jxcontext.Context) (orderNo int64) {
|
||||
const prefix = 88
|
||||
const randPartNum = 1000
|
||||
orderNo = time.Now().Unix() - orderNoBeginTimestamp
|
||||
// fmt.Println(orderNo)
|
||||
@@ -110,10 +113,17 @@ func GenOrderNo(ctx *jxcontext.Context) (orderNo int64) {
|
||||
randPart += int(v) << ((k % 3) * 8)
|
||||
}
|
||||
orderNo += int64(randPart % randPartNum)
|
||||
orderNo += int64(math.Pow10(int(math.Log10(float64(orderNo)))+1)) * 88
|
||||
orderNo += int64(math.Pow10(int(math.Log10(float64(orderNo)))+1)) * prefix
|
||||
return orderNo
|
||||
}
|
||||
|
||||
func GenRefundID(order *model.GoodsOrder) (refundID int64) {
|
||||
const suffix = 100000
|
||||
orderID := utils.Str2Int64(order.VendorOrderID) * suffix
|
||||
orderID += int64(time.Now().Sub(order.OrderFinishedAt) / time.Minute)
|
||||
return refundID
|
||||
}
|
||||
|
||||
func formalizeSkus(skus []*JxSkuInfo) (outSkus []*JxSkuInfo) {
|
||||
skuMap := make(map[int]int)
|
||||
for _, v := range skus {
|
||||
@@ -290,3 +300,72 @@ func jxOrder2GoodsOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, deliveryAd
|
||||
|
||||
return order, err
|
||||
}
|
||||
|
||||
func AcceptOrRefuseOrder(order *model.GoodsOrder, isAcceptIt bool, userName string) (err error) {
|
||||
var status int
|
||||
if isAcceptIt {
|
||||
status = model.OrderStatusAccepted
|
||||
} else {
|
||||
status = model.OrderStatusCanceled
|
||||
}
|
||||
return changeOrderStatus(order.VendorOrderID, status, "")
|
||||
}
|
||||
|
||||
func PickupGoods(order *model.GoodsOrder, isSelfDelivery bool, userName string) (err error) {
|
||||
return changeOrderStatus(order.VendorOrderID, model.OrderStatusFinishedPickup, "")
|
||||
}
|
||||
|
||||
func SelfDeliverDelivering(order *model.GoodsOrder, userName string) (err error) {
|
||||
return changeOrderStatus(order.VendorOrderID, model.OrderStatusDelivering, "")
|
||||
}
|
||||
|
||||
func SelfDeliverDelivered(order *model.GoodsOrder, userName string) (err error) {
|
||||
return changeOrderStatus(order.VendorOrderID, model.OrderStatusFinished, "")
|
||||
}
|
||||
|
||||
func CancelOrder(ctx *jxcontext.Context, order *model.GoodsOrder, reason string) (err error) {
|
||||
if order.Status < model.OrderStatusDelivering {
|
||||
orderPay := &model.OrderPay{
|
||||
VendorOrderID: order.VendorOrderID,
|
||||
VendorID: jxutils.GetPossibleVendorIDFromVendorOrderID(order.VendorOrderID),
|
||||
Status: model.PayStatusYes,
|
||||
}
|
||||
orderPay.DeletedAt = utils.DefaultTimeValue
|
||||
db := dao.GetDB()
|
||||
if err = dao.GetEntity(db, orderPay, "VendorOrderID", "VendorID", "Status", "DeletedAt"); err == nil || dao.IsNoRowsError(err) {
|
||||
if err == nil {
|
||||
refundID := utils.Int64ToStr(GenRefundID(order))
|
||||
orderPayRefund, err2 := refundOrderByWX(ctx, orderPay, refundID)
|
||||
if err = err2; err == nil {
|
||||
dao.WrapAddIDCULDEntity(orderPayRefund, ctx.GetUserName())
|
||||
err = dao.CreateEntity(dao.GetDB(), orderPay)
|
||||
}
|
||||
} else {
|
||||
if order.Status >= model.OrderStatusNew {
|
||||
globals.SugarLogger.Warnf("订单:%s找不到有效的支付方式", order.VendorOrderID)
|
||||
}
|
||||
}
|
||||
if err == nil {
|
||||
err = changeOrderStatus(order.VendorOrderID, model.OrderStatusCanceled, reason)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
err = fmt.Errorf("当前订单状态:%s不允许取消", model.OrderStatusName[order.Status])
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func changeOrderStatus(vendorOrderID string, status int, remark string) (err error) {
|
||||
orderStatus := &model.OrderStatus{
|
||||
VendorOrderID: vendorOrderID,
|
||||
VendorID: model.VendorIDJX,
|
||||
OrderType: model.OrderTypeOrder,
|
||||
RefVendorOrderID: vendorOrderID,
|
||||
RefVendorID: model.VendorIDJX,
|
||||
VendorStatus: utils.Int2Str(status),
|
||||
Status: status,
|
||||
StatusTime: time.Now(),
|
||||
Remark: remark,
|
||||
}
|
||||
return partner.CurOrderManager.OnOrderStatusChanged(orderStatus)
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
)
|
||||
|
||||
@@ -20,7 +21,7 @@ func pay4OrderByWX(ctx *jxcontext.Context, order *model.GoodsOrder, vendorPayTyp
|
||||
payCreatedAt := time.Now()
|
||||
param := &wxpay.CreateOrderParam{
|
||||
Body: "",
|
||||
NotifyURL: "http://callback.test.jxc4.com/wxpay/msg/",
|
||||
NotifyURL: globals.WxpayNotifyURL,
|
||||
OutTradeNo: order.VendorOrderID,
|
||||
SpbillCreateIP: ctx.GetRealRemoteIP(),
|
||||
TradeType: vendorPayType2WxpayType(vendorPayType),
|
||||
@@ -40,14 +41,19 @@ func pay4OrderByWX(ctx *jxcontext.Context, order *model.GoodsOrder, vendorPayTyp
|
||||
PayCreatedAt: payCreatedAt,
|
||||
PrepayID: result.PrepayID,
|
||||
CodeURL: result.CodeURL,
|
||||
TotalFee: int(order.ActualPayPrice),
|
||||
}
|
||||
dao.WrapAddIDCULDEntity(orderPay, ctx.GetUserName())
|
||||
err = dao.CreateEntity(dao.GetDB(), orderPay)
|
||||
}
|
||||
return orderPay, err
|
||||
}
|
||||
|
||||
func OnWxPayCallback(msg *wxpay.CallbackMsg) (err error) {
|
||||
switch msg.MsgType {
|
||||
case wxpay.MsgTypePay:
|
||||
err = onWxpayFinished(msg.Data.(*wxpay.PayResultMsg))
|
||||
case wxpay.MsgTypeRefund:
|
||||
err = onWxpayRefund(msg.Data.(*wxpay.RefundResultMsg))
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -62,9 +68,59 @@ func onWxpayFinished(msg *wxpay.PayResultMsg) (err error) {
|
||||
if err = dao.GetEntity(db, orderPay, "VendorOrderID", "VendorID", "PayType", "DeletedAt"); err == nil {
|
||||
orderPay.VendorPayType = msg.TradeType
|
||||
orderPay.PayFinishedAt = utils.Time2Pointer(wxpay.PayTime2Time(msg.TimeEnd))
|
||||
orderPay.Status = model.PayStatusYes
|
||||
orderPay.TransactionID = msg.TransactionID
|
||||
orderPay.OriginalData = utils.Format4Output(msg, true)
|
||||
if msg.ResultCode == wxpay.ResponseCodeSuccess {
|
||||
orderPay.Status = model.PayStatusYes
|
||||
} else {
|
||||
orderPay.Status = model.PayStatusFailed
|
||||
}
|
||||
dao.UpdateEntity(db, orderPay)
|
||||
err = OnPayFinished(orderPay)
|
||||
if msg.ResultCode == wxpay.ResponseCodeSuccess {
|
||||
err = OnPayFinished(orderPay)
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func onWxpayRefund(msg *wxpay.RefundResultMsg) (err error) {
|
||||
orderPayRefund := &model.OrderPayRefund{
|
||||
RefundID: msg.ReqInfoObj.OutRefundNo,
|
||||
}
|
||||
db := dao.GetDB()
|
||||
if err = dao.GetEntity(db, orderPayRefund, "RefundID"); err == nil {
|
||||
if msg.ResultCode == wxpay.ResponseCodeSuccess {
|
||||
orderPayRefund.Status = model.PayStatusYes
|
||||
} else {
|
||||
orderPayRefund.Status = model.PayStatusFailed
|
||||
}
|
||||
orderPayRefund.OriginalData = utils.Format4Output(msg, true)
|
||||
dao.UpdateEntity(db, orderPayRefund)
|
||||
} else if dao.IsNoRowsError(err) {
|
||||
globals.SugarLogger.Warnf("收到异常的退款事件, msg:%s", utils.Format4Output(msg, true))
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func refundOrderByWX(ctx *jxcontext.Context, orderPay *model.OrderPay, refundID string) (orderPayRefund *model.OrderPayRefund, err error) {
|
||||
result, err := api.WxpayAPI.PayRefund(&wxpay.PayRefundParam{
|
||||
OutTradeNo: orderPay.VendorOrderID,
|
||||
NotifyURL: globals.WxpayNotifyURL,
|
||||
OutRefundNo: refundID,
|
||||
TotalFee: orderPay.TotalFee,
|
||||
RefundFee: orderPay.TotalFee,
|
||||
})
|
||||
if err == nil {
|
||||
orderPayRefund = &model.OrderPayRefund{
|
||||
RefundID: refundID,
|
||||
VendorRefundID: result.RefundID,
|
||||
VendorOrderID: orderPay.VendorOrderID,
|
||||
VendorID: orderPay.VendorID,
|
||||
Status: model.PayStatusNo,
|
||||
TransactionID: orderPay.TransactionID,
|
||||
RefundFee: orderPay.TotalFee,
|
||||
RefundCreatedAt: time.Now(),
|
||||
}
|
||||
}
|
||||
return orderPayRefund, err
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/jx/phpjx"
|
||||
)
|
||||
|
||||
@@ -27,6 +28,8 @@ func (c *PurchaseHandler) AcceptOrRefuseOrder(order *model.GoodsOrder, isAcceptI
|
||||
}
|
||||
if model.IsOrderJXTemp(order) {
|
||||
err = phpjx.NotifyOrderStatusChanged(order, status)
|
||||
} else {
|
||||
err = localjx.AcceptOrRefuseOrder(order, isAcceptIt, userName)
|
||||
}
|
||||
return err
|
||||
}
|
||||
@@ -34,6 +37,8 @@ func (c *PurchaseHandler) AcceptOrRefuseOrder(order *model.GoodsOrder, isAcceptI
|
||||
func (c *PurchaseHandler) PickupGoods(order *model.GoodsOrder, isSelfDelivery bool, userName string) (err error) {
|
||||
if model.IsOrderJXTemp(order) {
|
||||
err = phpjx.NotifyOrderStatusChanged(order, model.OrderStatusFinishedPickup)
|
||||
} else {
|
||||
err = localjx.PickupGoods(order, isSelfDelivery, userName)
|
||||
}
|
||||
return err
|
||||
}
|
||||
@@ -61,6 +66,8 @@ func (c *PurchaseHandler) Swtich2SelfDelivered(order *model.GoodsOrder, userName
|
||||
func (c *PurchaseHandler) SelfDeliverDelivering(order *model.GoodsOrder, userName string) (err error) {
|
||||
if model.IsOrderJXTemp(order) {
|
||||
err = phpjx.NotifyOrderStatusChanged(order, model.OrderStatusDelivering)
|
||||
} else {
|
||||
err = localjx.SelfDeliverDelivering(order, userName)
|
||||
}
|
||||
return err
|
||||
}
|
||||
@@ -68,6 +75,8 @@ func (c *PurchaseHandler) SelfDeliverDelivering(order *model.GoodsOrder, userNam
|
||||
func (c *PurchaseHandler) SelfDeliverDelivered(order *model.GoodsOrder, userName string) (err error) {
|
||||
if model.IsOrderJXTemp(order) {
|
||||
err = phpjx.NotifyOrderStatusChanged(order, model.OrderStatusFinished)
|
||||
} else {
|
||||
err = localjx.SelfDeliverDelivered(order, userName)
|
||||
}
|
||||
return err
|
||||
}
|
||||
@@ -83,6 +92,8 @@ func (c *PurchaseHandler) AgreeOrRefuseCancel(ctx *jxcontext.Context, order *mod
|
||||
func (c *PurchaseHandler) CancelOrder(ctx *jxcontext.Context, order *model.GoodsOrder, reason string) (err error) {
|
||||
if model.IsOrderJXTemp(order) {
|
||||
err = phpjx.NotifyOrderStatusChanged(order, model.OrderStatusCanceled)
|
||||
} else {
|
||||
err = localjx.CancelOrder(ctx, order, reason)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ weixinMiniSecret = "e7ec67c86cbd4dfa531af7af7533cdc9"
|
||||
wxpayAppID = "wx4b5930c13f8b1170"
|
||||
wxpayAppKey = "XKJPOIHJ233adf01KJIXlIeQDSDKFJAD"
|
||||
wxpayAppMchID = "1390686702"
|
||||
wxpayNotifyURL = "http://callback.test.jxc4.com/wxpay/msg/"
|
||||
|
||||
backstageHost = "http://www.jxc4.com"
|
||||
wxBackstageHost = "http://wx.jxc4.com"
|
||||
@@ -152,6 +153,8 @@ weixinSecret = "6bbbed1443cc062c20a015a64c07a531"
|
||||
weixinMiniAppID2 = "wx4b5930c13f8b1170"
|
||||
weixinMiniSecret2 = "2a57228a716ce991a52739f0ff41111d"
|
||||
|
||||
wxpayNotifyURL = "http://callback.jxc4.com/wxpay/msg/"
|
||||
|
||||
dbConnectStr = "root:WebServer@1@tcp(db1.int.jxc4.com:3306)/jxd_dev_0?charset=utf8mb4&loc=Local&parseTime=true"
|
||||
|
||||
enableStoreWrite = true
|
||||
@@ -207,6 +210,8 @@ weixinSecret = "6bbbed1443cc062c20a015a64c07a531"
|
||||
weixinMiniAppID = "wx2d6949f724b2541d"
|
||||
weixinMiniSecret = "11f3c380551c4683c149990b004d6df9"
|
||||
|
||||
wxpayNotifyURL = "http://callback-jxgy.jxc4.com/wxpay/msg/"
|
||||
|
||||
backstageHost = "http://www-jxgy.jxc4.com"
|
||||
wxBackstageHost = "http://wx-jxgy.jxc4.com"
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/wxpay"
|
||||
@@ -16,15 +17,18 @@ type WXPayController struct {
|
||||
func (c *WXPayController) Msg() {
|
||||
if c.Ctx.Input.Method() == http.MethodPost {
|
||||
msg, callbackResponse := api.WxpayAPI.GetCallbackMsg(c.Ctx.Request)
|
||||
var err error
|
||||
if callbackResponse == nil {
|
||||
if err := localjx.OnWxPayCallback(msg); err != nil {
|
||||
if msg.MsgType != wxpay.MsgTypeUnkown {
|
||||
callbackResponse = wxpay.Err2CallbackResponse(err, "")
|
||||
}
|
||||
if msg.MsgType != wxpay.MsgTypeUnkown {
|
||||
err = fmt.Errorf("未知的微信支付回调类型:%d", msg.MsgType)
|
||||
} else {
|
||||
err = localjx.OnWxPayCallback(msg)
|
||||
}
|
||||
}
|
||||
if callbackResponse == nil {
|
||||
callbackResponse = wxpay.SuccessResponse
|
||||
} else if err != nil {
|
||||
callbackResponse = wxpay.Err2CallbackResponse(err, "")
|
||||
}
|
||||
c.Data["xml"] = callbackResponse
|
||||
c.ServeXML()
|
||||
|
||||
@@ -47,6 +47,8 @@ var (
|
||||
|
||||
EnableWXAuth2 bool
|
||||
DisableWXAuth1 bool
|
||||
|
||||
WxpayNotifyURL string
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -92,6 +94,8 @@ func Init() {
|
||||
|
||||
EnableWXAuth2 = true // beego.BConfig.RunMode == "beta"
|
||||
DisableWXAuth1 = true
|
||||
|
||||
WxpayNotifyURL = beego.AppConfig.DefaultString("wxpayNotifyURL", "")
|
||||
}
|
||||
|
||||
func IsCallbackAlwaysReturnSuccess() bool {
|
||||
|
||||
Reference in New Issue
Block a user