//②、统一下单
$input = new \WxPayUnifiedOrder();
$input->SetBody(“商务秘书-”.trim($order_info[‘order_sn’]));
$input->SetAttach(“商务秘书-”.trim($order_info[‘order_sn’]));
$input->SetOut_trade_no($pay_sn);
$input->SetTotal_fee(floatval($order_info[‘amount’])*100);
$input->SetTime_start(date(“YmdHis”));
$input->SetTime_expire(date(“YmdHis”, time() + 3600));
$input->SetGoods_tag(“商务秘书-”.trim($order_info[‘order_sn’]));
$input->SetTrade_type(“JSAPI”);
$input->SetOpenid($openId);
$order = \WxPayApi::unifiedOrder($input);
//echo ‘<font color="#f00"><b>统一下单支付单信息</b></font><br/>’;
//printf_info($order);
$arr= array();
$arr[‘appId’] = $order[‘appid’];
$arr[‘nonceStr’] = $order[‘nonce_str’];
$arr[‘package’] = “prepay_id=”.$order[‘prepay_id’];
$arr[‘signType’] = “MD5”;
$arr[‘timeStamp’] = (string)time();
$str = $this->ToUrlParams($arr);
$jmstr = $str."&key=".\WxPayConfig::KEY;
$arr[‘paySign’] = strtoupper(MD5($jmstr));
echo json_encode(array(‘status’=>1,‘arr’=>$arr));
exit();
运行时,显示 order:undefined,请问这是什么问题