何何
何何
  • 发布:2018-09-26 14:11
  • 更新:2018-09-26 14:11
  • 阅读:4286

微信支付第一次弹出支付页面,取消之后再次支付就不能调起支付了 {

分类:5+ SDK

$.ajax({
type: 'GET',
url: url,
dataType: 'json',
async: false,
data: {},
success: function(result) {
if(id == 'alipay') {
if(result.code == 4) {
//plus.runtime.openURL(result.data);
plus.payment.request(pays[id], result.data, function(result) {
console.log(pays[id]);
console.log(result);
}, function(e) {
console.error(JSON.stringify(e));
})
}
} else if(id == 'wxpay') {
if(result.code == 4) {
var wxurl = result.data;
$.ajax({
type: 'GET',
url: wxurl,
dataType: 'json',
data: {},
success: function(rsp) {
var wxxinxi = {
"sign": rsp.result_data.sign,
"timeStamp": rsp.result_data.timestamp,
"nonceStr": rsp.result_data.noncestr,
"partnerId": rsp.result_data.partnerid,
"prepayId": rsp.result_data.prepayid,
"package": rsp.result_data.package,
"appId": rsp.result_data.appid
};
console.log(JSON.stringify(wxxinxi));
plus.payment.request(pays[id], wxxinxi, function(result) {
console.log(pays[id]);
console.log(result);
}, function(e) {
console.error(JSON.stringify(e));
})
}
})
}
} else {
plus.nativeUI.alert(result.message)
}
}
})

2018-09-26 14:11 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复

  • 标题 / 粗斜体
  • 代码片段
  • 超链接 / 图片 / 视频
  • 列表 / 引用

文章内容较多时,可以用标题分段 :

## 大标题 
### 小标题

斜体 / 粗体 :

**粗体** 
*斜体*
***粗斜体***

代码片段 :

``` javascript
代码片段
```

超链接 :

[链接文字](链接地址) 例: [百度](http://www.baidu.com)

图片 :

![图片说明](图片地址) 例: ![百度logo](http://www.baidu.com/img/bdlogo.gif)

视频 :

!![视频说明](视频地址) 例: !![优酷视频](http://youku.com)

有序列表 :

1. 123
2. 123
3. 123

无序列表 :

- 123
- 123
- 123

引用 : ( 双回车后结束引用 )

> 引用内容
引用内容
引用内容