From 6b9eb80be970993c5d326ae6ae94944056ff58bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 6 Nov 2020 16:33:59 +0800 Subject: [PATCH] pay result --- business/jxstore/cms/order.go | 4 ++++ business/jxstore/financial/financial.go | 1 + 2 files changed, 5 insertions(+) diff --git a/business/jxstore/cms/order.go b/business/jxstore/cms/order.go index 6435965a6..68b36c158 100644 --- a/business/jxstore/cms/order.go +++ b/business/jxstore/cms/order.go @@ -3,6 +3,8 @@ package cms import ( "fmt" + "git.rosy.net.cn/jx-callback/globals" + "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/jxstore/financial" @@ -54,6 +56,7 @@ func Pay(ctx *jxcontext.Context, orderID string, payType int, vendorPayType stri VendorPayType: vendorPayType, } ) + globals.SugarLogger.Debugf("pay begin……") err = dao.GetEntity(db, order, "OrderID") if order.ID == 0 { return result, fmt.Errorf("未找到此订单!") @@ -65,6 +68,7 @@ func Pay(ctx *jxcontext.Context, orderID string, payType int, vendorPayType stri err = financial.AddUserBill(db, jxutils.GenBillID(), order.UserID) } err = payHandler.CreatePay() + globals.SugarLogger.Debugf("result : %v", utils.Format4Output(payHandler.WxPayParam, false)) return payHandler.WxPayParam, err } diff --git a/business/jxstore/financial/financial.go b/business/jxstore/financial/financial.go index 8feb04834..7a7957efe 100644 --- a/business/jxstore/financial/financial.go +++ b/business/jxstore/financial/financial.go @@ -106,6 +106,7 @@ func signParam(signType string, params map[string]interface{}) (sig string) { sort.Sort(sort.StringSlice(valueList)) valueList = append(valueList, fmt.Sprintf("key=%s", globals.WxpayAppKey)) sig = strings.Join(valueList, "&") + fmt.Println("test111111111111111111111111111111111111111111111", sig) var binSig []byte if signType == sigTypeSha256 { mac := hmac.New(sha256.New, []byte(globals.WxpayAppKey))