adjust
This commit is contained in:
parent
a6a802b293
commit
8a1c3bee96
@ -10,6 +10,6 @@
|
||||
"wx_msg_notify_token": "kingsome",
|
||||
"wx_msg_notify_encoding_aes_key": "2LO2BseGYDjPRK6xSf0Opv3PzWtOq2c3d8NhZHAVYbL",
|
||||
"wx_nofity_host": "https://payservice-test.kingsome.cn",
|
||||
"wx_link_title": "点我充值",
|
||||
"wx_link_description": "充值后返回游戏查看"
|
||||
"wx_link_title": "点我购买",
|
||||
"wx_link_description": "完成支付后返回游戏查看"
|
||||
}
|
||||
|
@ -46,5 +46,61 @@
|
||||
"type": 1,
|
||||
"price": 648,
|
||||
"count": 6480
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "基础特惠礼包",
|
||||
"icon": "10_106",
|
||||
"type": 1,
|
||||
"price": 648,
|
||||
"count": 6480
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "中级特惠礼包",
|
||||
"icon": "10_106",
|
||||
"type": 1,
|
||||
"price": 648,
|
||||
"count": 6480
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"name": "高级特惠礼包",
|
||||
"icon": "10_106",
|
||||
"type": 1,
|
||||
"price": 648,
|
||||
"count": 6480
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"name": "终极特惠礼包",
|
||||
"icon": "10_106",
|
||||
"type": 1,
|
||||
"price": 648,
|
||||
"count": 6480
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"name": "基础特权",
|
||||
"icon": "10_106",
|
||||
"type": 1,
|
||||
"price": 648,
|
||||
"count": 6480
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": "高级特权",
|
||||
"icon": "10_106",
|
||||
"type": 1,
|
||||
"price": 648,
|
||||
"count": 6480
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"name": "终极特权",
|
||||
"icon": "10_106",
|
||||
"type": 1,
|
||||
"price": 648,
|
||||
"count": 6480
|
||||
}
|
||||
]
|
@ -362,6 +362,7 @@ func (this *MainServiceApi) WxMsgNotify(c *gin.Context) {
|
||||
}
|
||||
|
||||
thumburl := service.Wxpay.GenThumburl(int64(orderModel.GameId))
|
||||
itemname, _ := service.Wxpay.GetGoodsName(int64(orderModel.GameId), int64(orderModel.ItemId))
|
||||
|
||||
// 发给客服系统的clicklink
|
||||
clickurl := fmt.Sprintf("%s/wx/clicknotify?orderid=%s", mt.Table.Config.GetWxNofityHost(), orderid)
|
||||
@ -378,7 +379,7 @@ func (this *MainServiceApi) WxMsgNotify(c *gin.Context) {
|
||||
Url string `json:"url"`
|
||||
Thumb_url string `json:"thumb_url"`
|
||||
}{
|
||||
Title: mt.Table.Config.GetWxLinkTitle(),
|
||||
Title: mt.Table.Config.GetWxLinkTitle() + " " + itemname,
|
||||
Description: mt.Table.Config.GetWxLinkDescription(),
|
||||
Url: clickurl,
|
||||
Thumb_url: thumburl,
|
||||
|
@ -238,6 +238,20 @@ func (wp *wxpay) GetGoodsCount(gameid int64, goodsid int64) (count int64, err er
|
||||
return info.Count, nil
|
||||
}
|
||||
|
||||
func (wp *wxpay) GetGoodsName(gameid int64, goodsid int64) (name string, err error) {
|
||||
goods, ok := wp.gamesGoods.Load(gameid)
|
||||
if !ok {
|
||||
return "", errors.New("no game")
|
||||
}
|
||||
|
||||
info, ok := (*goods)[goodsid]
|
||||
if !ok {
|
||||
return "", errors.New("no goods")
|
||||
}
|
||||
|
||||
return info.Name, nil
|
||||
}
|
||||
|
||||
func (wp *wxpay) QueryBalance(openid string, gameid int64, userip string, sessionkey string) (balance int64, wxerrcode int32, err error) {
|
||||
cfg := mt.Table.Wxconfig.GetById(gameid)
|
||||
postbody := struct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user