|
|
@@ -29,7 +29,7 @@ func WxRefundsTest(c *gin.Context) { |
|
|
|
} |
|
|
|
sysCfgDb := db.SysCfgDb{} |
|
|
|
sysCfgDb.Set() |
|
|
|
sysCfg := sysCfgDb.SysCfgFindWithDb(enum2.WxSpMchId) |
|
|
|
sysCfg := sysCfgDb.SysCfgFindWithDb(enum2.WxMchId, enum2.WxJsapiRefundPayNotifyUrl) |
|
|
|
client, err := svc3.NewWxPayClient(c) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR, err.Error()) |
|
|
@@ -41,11 +41,11 @@ func WxRefundsTest(c *gin.Context) { |
|
|
|
|
|
|
|
resp, result, err := wxSvc.Create(c, |
|
|
|
refunddomestic.CreateRequest{ |
|
|
|
SubMchid: core.String(sysCfg[enum2.WxSpMchId]), |
|
|
|
SubMchid: core.String(sysCfg[enum2.WxMchId]), |
|
|
|
OutTradeNo: core.String(ord.OutTradeNo), |
|
|
|
OutRefundNo: core.String(outRequestNo), |
|
|
|
Reason: core.String("央厨订餐退款"), |
|
|
|
NotifyUrl: core.String("https://weixin.qq.com"), |
|
|
|
NotifyUrl: core.String(sysCfg[enum2.WxJsapiRefundPayNotifyUrl]), |
|
|
|
Amount: &refunddomestic.AmountReq{ |
|
|
|
Currency: core.String("CNY"), |
|
|
|
Refund: core.Int64(utils.StrToInt64(refund)), |
|
|
@@ -60,6 +60,7 @@ func WxRefundsTest(c *gin.Context) { |
|
|
|
// 处理返回结果 |
|
|
|
println("status=%d resp=%s", result.Response.StatusCode, resp) |
|
|
|
} |
|
|
|
|
|
|
|
e.OutSuc(c, map[string]interface{}{ |
|
|
|
"resp": resp, |
|
|
|
"result": result, |
|
|
|