Commit 8065328e authored by jiangjiantao's avatar jiangjiantao

支付调试

parents 1c8029ce 137c5dcb
......@@ -50,8 +50,7 @@ Page({
this.setData({
orderNo:res.data
});
this.payWithOpenCashier();
this.payWithOpenCashier(res.data);
}
}
}.bind(this));
......@@ -59,7 +58,7 @@ Page({
//调用收款接口
doPay(orderNo, payCode) {
console.log("doPay调用");
console.log("doPay调用"+orderNo);
this.setData({isPaying:true});
//使用barCode来当面付
payUtils.startPay(orderNo, payCode, 1, this.data.list, function(res){
......@@ -69,7 +68,7 @@ Page({
if(res == null){
return;
}
if(res.code > 0){
if(res.resultCode == 1){
//成功
console.log("支付回调成功,跳转 " );
// if(data.isCashierClosed == true){
......@@ -94,6 +93,7 @@ Page({
* 打开收银台,进行扫码收款
*/
payWithOpenCashier(orderNo){
try{
console.info("收银台版本" + my.ix.getVersionSync({
packageName: 'zoloz.phone.android.alipay.com.dragonfly'
......
......@@ -192,6 +192,7 @@ function pay(tradeNo, payCode, payPrice, list, callback, retryCount){
timeout: 30000,
data: payRequest,
success: (res) => {
console.log("支付接口回掉 ==>" + JSON.stringify(res));
//增加数据判断,增加重试
if (res == null|| res.data == null|| res.data.success != true||res.data.data == null) {
console.log("支付未成功 ==>" + res.data.message);
......@@ -262,6 +263,7 @@ function queryPayStateWithRetry(tradeNo, callback, retryCount){
timeout: 30000,
data: queryStateRequest,
success: (res) => {
console.log("支付结果回掉"+JSON.stringify(res));
//增加数据判断,增加重试
if (res == null|| res.data == null|| res.data.success != true||res.data.data == null) {//不知名原因导致失败,直接报失败
console.log("查询失败,支付失败");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment