作者 sgj
1 个管道 的构建 通过 耗费 0 秒

modify the user charge

... ... @@ -532,9 +532,8 @@ class OrderController extends HomeBaseController{
*/
public function pay($order_no){
$order=Db::name('order')->where(['order_no'=>$order_no,'state'=>2])->find();
$openId=Db::name('users')->where('id',$order['users_id'])->find()['open_id'];
dump($openId);
$body='支付';
$price=$order['price']*100;//订单价格
$notify_url=url('order/notify','','',true);//回调地址
... ...
... ... @@ -43,11 +43,10 @@ class WeixinPay {
'trade_type' => 'JSAPI'//交易类型
);
//统一下单签名
dump($parameters);
$parameters['sign'] = $this->getSign($parameters);
$xmlData = $this->arrayToXml($parameters);
$return = $this->xmlToArray($this->postXmlCurl($xmlData, $url, 60));
dump($return);
return $return;
}
private static function postXmlCurl($xml, $url, $second = 30)
... ...