From 4e64947d861ffceea79816996aab49ff65827df1 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Mon, 21 Aug 2023 15:50:27 +0800 Subject: [PATCH] update --- app/hdl/hdl_demo.go | 2 +- app/hdl/hdl_wx.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/hdl/hdl_demo.go b/app/hdl/hdl_demo.go index 5f62687..b3040bd 100644 --- a/app/hdl/hdl_demo.go +++ b/app/hdl/hdl_demo.go @@ -26,7 +26,7 @@ func Demo(c *gin.Context) { } func Demo1(c *gin.Context) { - post, err := utils.CurlPost("http://pay.com/wx/redPackage/index", map[string]string{ + post, err := utils.CurlPost("http://pay.izhyin.com/wx/redPackage/index", map[string]string{ "re_openid": "oLAbGuMC5o6fJRcLSicj0MENGoEo", "amount": "100.00", }, nil) diff --git a/app/hdl/hdl_wx.go b/app/hdl/hdl_wx.go index cbe11cd..a43fb60 100644 --- a/app/hdl/hdl_wx.go +++ b/app/hdl/hdl_wx.go @@ -216,12 +216,13 @@ func DealCallBack(openId, ticket string) error { //4、发送微信红包 post, err := utils.CurlPost("http://pay.izhyin.com/wx/redPackage/index", map[string]string{ "openid": openId, - "amount": utils.Int64ToStr(utils.StrToInt64(qrcodeWithBatchRecord.Amount) * 100), + "amount": utils.Float64ToStr(utils.StrToFloat64(qrcodeWithBatchRecord.Amount) * 100), }, nil) + utils.FilePutContents("send_redPackage", utils.SerializeStr(map[string]interface{}{ "args": map[string]string{ "openid": openId, - "amount": utils.Int64ToStr(utils.StrToInt64(qrcodeWithBatchRecord.Amount) * 100), + "amount": utils.Float64ToStr(utils.StrToFloat64(qrcodeWithBatchRecord.Amount) * 100), }, "resp": post, }))