Commit 8aa21713a9d024bfc062479d34a6596122c6d597
1 parent
dc07d4e3
调试微信支付
Showing
2 changed files
with
13 additions
and
9 deletions
home.html
| ... | ... | @@ -83,7 +83,7 @@ |
| 83 | 83 | <script src="js/config.js?v=0.1"></script> |
| 84 | 84 | <script src="js/common.js?v=1.11"></script> |
| 85 | 85 | <!--<script src="js/jweixin-1.0.0.js?v=0.1"></script>--> |
| 86 | -<script src="js/pay.js?v=0.11320"></script> | |
| 86 | +<script src="js/pay.js?v=0.320"></script> | |
| 87 | 87 | </body> |
| 88 | 88 | |
| 89 | 89 | </html> | ... | ... |
js/pay.js
| ... | ... | @@ -277,14 +277,14 @@ var webAppClass = { |
| 277 | 277 | // wxParams.recordArreaInfos= JSON.stringify([{"orderId":webAppParams.orderId,"orderNotPayFee":_mon*100,"parkId":getQueryString(window.location).parkCode}]); |
| 278 | 278 | // |
| 279 | 279 | // //新增end |
| 280 | - | |
| 281 | - | |
| 282 | - if (webAppCode == null || webAppCode == "") {//code检测 | |
| 283 | - alertMsg(appState.codeNullTip); | |
| 284 | - $btnObj.style.display = "block"; | |
| 285 | - $btnLoad.style.display = "none"; | |
| 286 | - return; | |
| 287 | - } | |
| 280 | + alert('走了微信第一步') | |
| 281 | + | |
| 282 | + // if (webAppCode == null || webAppCode == "") {//code检测 | |
| 283 | + // alertMsg(appState.codeNullTip); | |
| 284 | + // $btnObj.style.display = "block"; | |
| 285 | + // $btnLoad.style.display = "none"; | |
| 286 | + // return; | |
| 287 | + // } | |
| 288 | 288 | webAppClass.payAjaxJDK(orderID); |
| 289 | 289 | console.log("wxPay");//微信支付 |
| 290 | 290 | break; |
| ... | ... | @@ -458,12 +458,15 @@ var webAppClass = { |
| 458 | 458 | |
| 459 | 459 | //1:有code获取OpenId |
| 460 | 460 | postRequest(openIdUrl, codeParams, function (res) { |
| 461 | + alert('走了微信接口') | |
| 461 | 462 | //alert(JSON.stringify(res)); |
| 462 | 463 | if (res.code == 0) { |
| 464 | + alert('走了微信接口为0') | |
| 463 | 465 | //alert(res.data); |
| 464 | 466 | webAppClass.getPayParams(res.data, orderID); |
| 465 | 467 | } |
| 466 | 468 | else if (res.code == 40163) {//code been used, hints[重复code问题] |
| 469 | + alert('走了微信接口不为0') | |
| 467 | 470 | alertMsg(appState.codeNullTip); |
| 468 | 471 | console.log(res.message); |
| 469 | 472 | $btnObj.style.display = "block"; |
| ... | ... | @@ -510,6 +513,7 @@ var webAppClass = { |
| 510 | 513 | var payParamsUrl = webAppRoot + window.webAppH5.wxPayServer; |
| 511 | 514 | //alert(payParamsUrl);alert(orderID); |
| 512 | 515 | postRequest(payParamsUrl, wxParams, function (res) { |
| 516 | + alert('走了微信支付接口') | |
| 513 | 517 | $btnObj.style.display = "block"; |
| 514 | 518 | $btnLoad.style.display = "none"; |
| 515 | 519 | //debugger; | ... | ... |