wxpay
This commit is contained in:
@@ -40,6 +40,39 @@ func (p *PayHandler) CreatePay() (err error) {
|
||||
// p.Order.OriginalData = utils.LimitUTF8StringLen(result.PayInfo, 3200)
|
||||
_, err = dao.UpdateEntity(dao.GetDB(), p.Order, "PrepayID", "TransactionID", "OriginalData")
|
||||
}
|
||||
case model.PayTypeWX:
|
||||
// payCreatedAt := time.Now()
|
||||
// param := &wxpayapi.CreateOrderParam{
|
||||
// OutTradeNo: utils.Int64ToStr(p.Order.OrderID),
|
||||
// Body: fmt.Sprintf("付款给冲天猴儿app:%f 元", jxutils.IntPrice2Standard(int64(p.Order.PayPrice))),
|
||||
// NotifyURL: globals.WxpayNotifyURL,
|
||||
// SpbillCreateIP: p.Ctx.GetRealRemoteIP(),
|
||||
// TradeType: p.VendorPayType,
|
||||
// TotalFee: int(order.ActualPayPrice),
|
||||
|
||||
// TimeStart: wxpayapi.Time2PayTime(payCreatedAt),
|
||||
// // TimeExpire: wxpayapi.Time2PayTime(payCreatedAt.Add(PayWaitingTime)),
|
||||
// ProfitSharing: wxpayapi.OptYes,
|
||||
// }
|
||||
// if authInfo, err := ctx.GetV2AuthInfo(); err == nil && authInfo.GetAuthType() == weixin.AuthTypeMini {
|
||||
// param.OpenID = authInfo.GetAuthID()
|
||||
// }
|
||||
// result, err := api.WxpayAPI.CreateUnifiedOrder(param)
|
||||
// if err == nil {
|
||||
// orderPay = &model.OrderPay{
|
||||
// PayOrderID: param.OutTradeNo,
|
||||
// PayType: model.PayTypeWX,
|
||||
// VendorPayType: vendorPayType,
|
||||
|
||||
// VendorOrderID: order.VendorOrderID,
|
||||
// VendorID: order.VendorID,
|
||||
// Status: 0,
|
||||
// PayCreatedAt: payCreatedAt,
|
||||
// PrepayID: result.PrepayID,
|
||||
// CodeURL: result.CodeURL,
|
||||
// TotalFee: int(order.ActualPayPrice),
|
||||
// }
|
||||
// }
|
||||
default:
|
||||
err = fmt.Errorf("支付方式:%d当前不支持", p.PayType)
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ yinbaoAppID = "18C0E0867E467DBC26EFF5E957B02EC4"
|
||||
|
||||
aliUpcAppCode = "00a6eefba0204d3fa310ac0ee7a6fc54"
|
||||
|
||||
wxpayNotifyURL = "http://callback.jxc4.com/wxpay/msg/"
|
||||
wxpayNotifyURL = "http://callback.rsm.jxc4.com/wxpay/msg/"
|
||||
|
||||
tonglianPayAppID = "00183083"
|
||||
tonglianPayKey = "18048531223"
|
||||
|
||||
Reference in New Issue
Block a user