query($sql_s); $rowset = $result -> fetchAll(PDO::FETCH_ASSOC); if($rowset){ $ifback=1; $to_order_id = $rowset[0]['to_orderid']; $back_order_id = $rowset[0]['back_orderid']; $sql = "CALL SP_CANCEL_ORDER(" . 0 . "," . $to_order_id . ")"; $result = $pdo -> query($sql); $sql = "CALL SP_CANCEL_ORDER(" . 0 . "," . $back_order_id . ")"; $result = $pdo -> query($sql); // $return = $result->fetchAll(PDO::FETCH_ASSOC); // if(isset($return[0]['@errorcode']) && $return[0]['@errorcode']=='-1'){ // $code =1; // $info = 'fail'; // $massge = '失败'; // $list = ""; // }else{ $code = 0; $info = 'success'; $massge = '成功'; // } $result -> closeCursor(); $time_cut = time()-strtotime($list['to']['run_time']); ///时间在开场30分钟前可以退票 }else{ //单程情况 $pdo = conn(); $sql = "CALL SP_CANCEL_ORDER(" . 0 . "," . $order_id . ")"; $result = $pdo -> query($sql); // $return = $result->fetchAll(PDO::FETCH_ASSOC); // if(isset($return[0]['@errorcode']) && $return[0]['@errorcode']=='-1'){ // $code =1; // $info = 'fail'; // $massge = '失败'; // $list = ""; // }else{ $code = 0; $info = 'success'; $massge = '订单已取消'; $result -> closeCursor(); } echo "支付超时,请重新下单"; die;