public function Queryorder($transaction_id) { $input = new WxPayOrderQuery(); $input->SetTransaction_id($transaction_id); $result = WxPayApi::orderQuery($input); Log::DEBUG("query:" . json_encode($result)); if (array_key_exists("return_code", $result) && array_key_exists("result_code", $result) && $result["return_code"] == "SUCCESS" && $result["result_code"] == "SUCCESS") { return true; } return false; }
foreach ($data as $key => $value) { echo "<font color='#f00;'>{$key}</font> : {$value} <br/>"; } } if (isset($_REQUEST["transaction_id"]) && $_REQUEST["transaction_id"] != "") { $transaction_id = $_REQUEST["transaction_id"]; $input = new WxPayOrderQuery(); $input->SetTransaction_id($transaction_id); printf_info(WxPayApi::orderQuery($input)); exit; } if (isset($_REQUEST["out_trade_no"]) && $_REQUEST["out_trade_no"] != "") { $out_trade_no = $_REQUEST["out_trade_no"]; $input = new WxPayOrderQuery(); $input->SetOut_trade_no($out_trade_no); printf_info(WxPayApi::orderQuery($input)); exit; } ?> <body> <form action="#" method="post"> <div style="margin-left:2%;color:#f00">微信订单号和商户订单号选少填一个,微信订单号优先:</div><br/> <div style="margin-left:2%;">微信订单号:</div><br/> <input type="text" style="width:96%;height:35px;margin-left:2%;" name="transaction_id" /><br /><br /> <div style="margin-left:2%;">商户订单号:</div><br/> <input type="text" style="width:96%;height:35px;margin-left:2%;" name="out_trade_no" /><br /><br /> <div align="center"> <input type="submit" value="查询" style="width:210px; height:50px; border-radius: 15px;background-color:#FE6714; border:0px #FE6714 solid; cursor: pointer; color:white; font-size:16px;" type="button" onclick="callpay()" /> </div> </form> </body>