|
@@ -86,7 +86,7 @@ Page({
|
|
|
"paymentCashAmount": salePrice,
|
|
|
"paymentCouponAmount": 0,
|
|
|
"shopId": shopId,
|
|
|
- "opneId": app.globalData.userInfo?.liteOpenid,
|
|
|
+ "openId": app.globalData.userInfo?.liteOpenid,
|
|
|
"goodsInfos": [{
|
|
|
"goodsId": id,
|
|
|
"goodsNum": 1,
|
|
@@ -100,6 +100,20 @@ Page({
|
|
|
if (data.code === 200) {
|
|
|
const { paymentConfig, paymentType, orderNo } = data.data
|
|
|
this.onExecutePay(paymentConfig, paymentType, orderNo)
|
|
|
+
|
|
|
+ // 测试h5页面支付流程
|
|
|
+ // const params = {
|
|
|
+ // paymentType: 'adapay-cooleshow-6560',
|
|
|
+ // pay_channel: 'wx_pub',
|
|
|
+ // wxAppId: 'wxbde13f59d40cb4f2',
|
|
|
+ // body: 'aaa',
|
|
|
+ // price: '0.01',
|
|
|
+ // orderNo,
|
|
|
+ // userId: app.globalData.userInfo?.id
|
|
|
+ // }
|
|
|
+ // wx.navigateTo({
|
|
|
+ // url: '../protocol/register?orderInfo=' + encodeURIComponent(JSON.stringify(params))
|
|
|
+ // })
|
|
|
} else {
|
|
|
this.onPayError()
|
|
|
}
|
|
@@ -113,11 +127,13 @@ Page({
|
|
|
success: async (wxres: any) => {
|
|
|
const res = await api_executePayment({
|
|
|
merOrderNo: paymentConfig.merOrderNo,
|
|
|
- paymentChannel: this.data.paymentChannel || 'wx_lite',
|
|
|
+ paymentChannel: this.data.paymentChannel || 'wx_lite', // 'wx_pub', //
|
|
|
paymentType,
|
|
|
userId: app.globalData.userInfo?.id,
|
|
|
code: wxres.code,
|
|
|
wxMiniAppId: app.globalData.appId
|
|
|
+ // code: '011yjYkl289aye4q2zml24UEWT3yjYkn',
|
|
|
+ // wxPubAppId: 'wxbde13f59d40cb4f2'
|
|
|
})
|
|
|
wx.hideLoading()
|
|
|
if(res.data.code === 200) {
|