Home > Backend Development > PHP Tutorial > 微信扫码支付 AJAX跳转问题

微信扫码支付 AJAX跳转问题

WBOY
Release: 2016-06-23 09:15:09
Original
1288 people have browsed it

微信扫码支付模式2,扫码支付成功,回调修改订单状态成功。

ajax写的代码就是不跳转。。

下面的前台调用代码

订单号:= $out_trade_no ?>
-----------------------------------------------------------------------------------------
<script><br /> var timeer;<br /> $(document).ready(function () {<br /> timeer = setInterval("GetStatus()",3000);<br /> });<br /> function GetStatus(){<br /> $.ajax({<br /> url: "ajax.php?id=" + $("#out_trade_no").val(),<br /> async:true,<br /> type:"GET",<br /> dataType: "json",<br /> data: "",<br /> success:function(data){<br /> if (data == 1) {<br /> window.location.href = "../../../"; //页面跳转<br /> }else{<br /> alert("请求订单状态出错");<br /> }<br /><br /> }<br /> });<br /> }<br /> </script>

这是后台查询=================

$order_ddno = $_GET['id'];
$r = $empire->fetch1("select isf from {$dbtbpre}payapi where checkpay='$order_ddno' limit 1");
echo json_encode($r['isf']);

请高手指点下问题出在哪里?


回复讨论(解决方案)

已经搞定了。。。。

没人来回个帖,结贴都结不了

怎么搞得的,可以讲解下吗?

我觉得 你应该是 判断支付成功的那个值  写错了  微信不认 所以你没跳走

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template