Authored by QC-L

fix: ios payment error

{
"compilerOptions": {
"target": "es2015",
"module": "commonjs"
}
{
"compilerOptions": {
"target": "es2015",
"module": "commonjs"
}
}
\ No newline at end of file
... ...
... ... @@ -117,6 +117,7 @@ function request(method = 'GET') {
'Content-Type': 'application/x-www-form-urlencoded',
'x-yoho-verify': resultString,
'Cookies': 'JSESSIONID=' + sessionkey,
'Cookie': 'JSESSIONID=' + sessionkey,
}
wx.request({
... ... @@ -198,6 +199,7 @@ function request(method = 'GET') {
'Content-Type': 'application/x-www-form-urlencoded',
'x-yoho-verify': resultString,
'Cookies': 'JSESSIONID=' + sessionkey,
'Cookie': 'JSESSIONID=' + sessionkey,
}
wx.request({
... ... @@ -295,7 +297,7 @@ function _publicParams() {
return {
app_version,
os_version,
os_version: '8.0.0',
client_type,
screen_size,
// physical_channel,
... ... @@ -323,11 +325,7 @@ function _signParam(params,opt) {
let resultParams = objectAssign(allParams, {client_secret});
let resultString;
if (opt === true){
resultString = queryString.stringify(resultParams,{encode: true});
}else{
resultString = queryString.stringify(resultParams,{encode: false});
}
resultString = queryString.stringify(resultParams,{encode: false});
return resultString;
}
... ... @@ -343,11 +341,7 @@ function _signParam(params,opt) {
let resultParams = objectAssign(allParams, {client_secret});
let resultString;
if (opt === true){
resultString = queryString.stringify(resultParams,{encode: true});
}else{
resultString = queryString.stringify(resultParams,{encode: false});
}
resultString = queryString.stringify(resultParams,{encode: false});
return resultString;
}
... ...
import { API_HOST, SERVICE_HOST } from '../../libs/config';
import { API_HOST, SERVICE_HOST, PAYMENT_CODE } from '../../libs/config';
import { GET, POST } from '../../libs/request';
import { wexinPay } from '../../utils/wxpay';
import { getYHStorageSync } from '../../utils/util';
... ... @@ -1078,7 +1078,7 @@ Page({
receiverMobile: delivery_address ? delivery_address.mobile : "",
use_yoho_coin: this.data.needYohoCode ? this.data.use_yoho_coin : 0,//double 否 1.00 使用的yoho币金额,单位元
use_red_envelopes: 0,//使用的红包,单位元
payment_id: 15,//int 否 15 支付id
payment_id: PAYMENT_CODE,//int 否 15 支付id
payment_type: 1,//支付方式,1 在线支付 2 货到付款
coupon_code: this.data.hasSelectYohoCouponCode ? this.data.hasSelectYohoCouponCode : "",//优惠券code,多个用","分割
client_type: 'miniapp',//string 否 web iphone 终端
... ... @@ -1229,7 +1229,7 @@ Page({
delivery_time: delivery_time ? delivery_time.delivery_time_id : 0,//int 否 2 寄送时间类型
use_yoho_coin: this.data.needYohoCode ? this.data.use_yoho_coin : 0,//double 否 1.00 使用的yoho币金额,单位元
use_red_envelopes: 0,//使用的红包,单位元
payment_id: 15,//int 否 15 支付id
payment_id: PAYMENT_CODE,//int 否 15 支付id
payment_type: 1,//支付方式,1 在线支付 2 货到付款
coupon_code: this.data.hasSelectYohoCouponCode ? this.data.hasSelectYohoCouponCode : "",//优惠券code,多个用","分割
client_type: 'miniapp',//string 否 web iphone 终端
... ... @@ -1249,7 +1249,7 @@ Page({
delivery_time: delivery_time ? delivery_time.delivery_time_id : 0,
delivery_way: delivery_way ? delivery_way.delivery_way_id : 1,
payment_type: 1,
payment_id: 15,
payment_id: PAYMENT_CODE,
use_yoho_coin: this.data.needYohoCode ? this.data.use_yoho_coin : 0,
use_red_envelopes: 0,
product_sku_list: this._getLimitProductData(goods)
... ... @@ -1260,7 +1260,7 @@ Page({
param = {
method: 'app.Shopping.deposit.submit',
payment_type: 1,
payment_id: 15,
payment_id: PAYMENT_CODE,
delivery_time: delivery_time ? delivery_time.delivery_time_id : 0,
delivery_way: delivery_way ? delivery_way.delivery_way_id : 1,
cart_type: 'advance',
... ... @@ -1389,7 +1389,7 @@ Page({
delivery_time: delivery_time ? delivery_time.delivery_time_id : 0,//int 否 2 寄送时间类型
use_yoho_coin: this.data.needYohoCode ? this.data.use_yoho_coin : 0,//double 否 1.00 使用的yoho币金额,单位元
use_red_envelopes: 0,//使用的红包,单位元
payment_id: 15,//int 否 15 支付id
payment_id: PAYMENT_CODE,//int 否 15 支付id
payment_type: 1,//支付方式,1 在线支付 2 货到付款
coupon_code: this.data.hasSelectYohoCouponCode ? this.data.hasSelectYohoCouponCode : "",//优惠券code,多个用","分割
client_type: 'miniapp',//string 否 web iphone 终端
... ...
... ... @@ -210,7 +210,7 @@ function wexinPay(data,payParam){
let param = {
method:'app.SpaceOrders.payConfirm',
order_code:orderCode,
payment_id:45,
payment_id: PAYMENT_CODE,
uid:app.globalData.userInfo.uid,
}
... ...