Browse Source

update

master
DengBiao 1 year ago
parent
commit
4e64947d86
2 changed files with 4 additions and 3 deletions
  1. +1
    -1
      app/hdl/hdl_demo.go
  2. +3
    -2
      app/hdl/hdl_wx.go

+ 1
- 1
app/hdl/hdl_demo.go View File

@@ -26,7 +26,7 @@ func Demo(c *gin.Context) {
} }


func Demo1(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", "re_openid": "oLAbGuMC5o6fJRcLSicj0MENGoEo",
"amount": "100.00", "amount": "100.00",
}, nil) }, nil)


+ 3
- 2
app/hdl/hdl_wx.go View File

@@ -216,12 +216,13 @@ func DealCallBack(openId, ticket string) error {
//4、发送微信红包 //4、发送微信红包
post, err := utils.CurlPost("http://pay.izhyin.com/wx/redPackage/index", map[string]string{ post, err := utils.CurlPost("http://pay.izhyin.com/wx/redPackage/index", map[string]string{
"openid": openId, "openid": openId,
"amount": utils.Int64ToStr(utils.StrToInt64(qrcodeWithBatchRecord.Amount) * 100),
"amount": utils.Float64ToStr(utils.StrToFloat64(qrcodeWithBatchRecord.Amount) * 100),
}, nil) }, nil)

utils.FilePutContents("send_redPackage", utils.SerializeStr(map[string]interface{}{ utils.FilePutContents("send_redPackage", utils.SerializeStr(map[string]interface{}{
"args": map[string]string{ "args": map[string]string{
"openid": openId, "openid": openId,
"amount": utils.Int64ToStr(utils.StrToInt64(qrcodeWithBatchRecord.Amount) * 100),
"amount": utils.Float64ToStr(utils.StrToFloat64(qrcodeWithBatchRecord.Amount) * 100),
}, },
"resp": post, "resp": post,
})) }))


Loading…
Cancel
Save