Commit b39a76c48cc1eb19b03cc2a56f73f067f70b579a

Authored by liuqimichale
1 parent 8aa21713

调试微信支付

Showing 2 changed files with 5 additions and 4 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.320"></script>
  86 +<script src="js/pay.js?v=0.4420"></script>
87 87 </body>
88 88  
89 89 </html>
... ...
js/pay.js
... ... @@ -458,15 +458,13 @@ var webAppClass = {
458 458  
459 459 //1:有code获取OpenId
460 460 postRequest(openIdUrl, codeParams, function (res) {
461   - alert('走了微信接口')
462 461 //alert(JSON.stringify(res));
463 462 if (res.code == 0) {
464   - alert('走了微信接口为0')
465 463 //alert(res.data);
466 464 webAppClass.getPayParams(res.data, orderID);
467 465 }
468 466 else if (res.code == 40163) {//code been used, hints[重复code问题]
469   - alert('走了微信接口不为0')
  467 +
470 468 alertMsg(appState.codeNullTip);
471 469 console.log(res.message);
472 470 $btnObj.style.display = "block";
... ... @@ -511,6 +509,9 @@ var webAppClass = {
511 509 wxParams.openId = openId;
512 510 wxParams.appId = appWxID;
513 511 var payParamsUrl = webAppRoot + window.webAppH5.wxPayServer;
  512 + alert('调接口之前')
  513 + alert(payParamsUrl)
  514 + alert(JSON.stringify(wxParams))
514 515 //alert(payParamsUrl);alert(orderID);
515 516 postRequest(payParamsUrl, wxParams, function (res) {
516 517 alert('走了微信支付接口')
... ...