我做了2个支付的页面,A页面可以支付,B页面提示"redirect uri参数错误"。
网上查找了好久,按查找的资料都没解决,实在没办法了,求助大家帮帮忙。
B页面设置支付的代码如下:
$tools = new \JsApiPay();
$openId = $tools->GetOpenid();
$input = new \WxPayUnifiedOrder();
$input->SetOpenid($openId);
$input->SetBody("aaaaaaaa");
$input->SetAttach("bbbbbbbbbb");
$input->SetOut_trade_no('ccccccc');
$input->SetTotal_fee("100");
$input->SetTime_start(date("YmdHis"));
$input->SetTime_expire(date("YmdHis", time() + 600));
$input->SetGoods_tag("ddddddddddd");
$input->SetNotify_url("http://www.xxxxxxxxxxx.com/WxPayV3/hsm/notify.php");
$input->SetTrade_type("JSAPI");
$order = \WxPayApi::unifiedOrder($input);
$jsApiParameters = $tools->GetJsApiParameters($order);
$this->assign('jsApiParameters',$jsApiParameters);
$this->display();
}
最佳答案