微信支付时,body必须填
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package localjx
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/wxpay"
|
||||
@@ -18,10 +19,14 @@ func vendorPayType2WxpayType(vendorPayType string) string {
|
||||
return vendorPayType
|
||||
}
|
||||
|
||||
func getOrderBrief(order *model.GoodsOrder) string {
|
||||
return fmt.Sprintf("%s等共%d件商品", order.Skus[0].SkuName, order.GoodsCount)
|
||||
}
|
||||
|
||||
func pay4OrderByWX(ctx *jxcontext.Context, order *model.GoodsOrder, vendorPayType string) (orderPay *model.OrderPay, err error) {
|
||||
payCreatedAt := time.Now()
|
||||
param := &wxpay.CreateOrderParam{
|
||||
Body: "",
|
||||
Body: getOrderBrief(order),
|
||||
NotifyURL: globals.WxpayNotifyURL,
|
||||
OutTradeNo: order.VendorOrderID,
|
||||
SpbillCreateIP: ctx.GetRealRemoteIP(),
|
||||
|
||||
Reference in New Issue
Block a user