1 个管道
的构建
通过
耗费
0 秒
modify the user charge
正在显示
2 个修改的文件
包含
2 行增加
和
4 行删除
@@ -532,9 +532,8 @@ class OrderController extends HomeBaseController{ | @@ -532,9 +532,8 @@ class OrderController extends HomeBaseController{ | ||
532 | */ | 532 | */ |
533 | public function pay($order_no){ | 533 | public function pay($order_no){ |
534 | $order=Db::name('order')->where(['order_no'=>$order_no,'state'=>2])->find(); | 534 | $order=Db::name('order')->where(['order_no'=>$order_no,'state'=>2])->find(); |
535 | - | ||
536 | $openId=Db::name('users')->where('id',$order['users_id'])->find()['open_id']; | 535 | $openId=Db::name('users')->where('id',$order['users_id'])->find()['open_id']; |
537 | - dump($openId); | 536 | + |
538 | $body='支付'; | 537 | $body='支付'; |
539 | $price=$order['price']*100;//订单价格 | 538 | $price=$order['price']*100;//订单价格 |
540 | $notify_url=url('order/notify','','',true);//回调地址 | 539 | $notify_url=url('order/notify','','',true);//回调地址 |
@@ -43,11 +43,10 @@ class WeixinPay { | @@ -43,11 +43,10 @@ class WeixinPay { | ||
43 | 'trade_type' => 'JSAPI'//交易类型 | 43 | 'trade_type' => 'JSAPI'//交易类型 |
44 | ); | 44 | ); |
45 | //统一下单签名 | 45 | //统一下单签名 |
46 | - dump($parameters); | 46 | + |
47 | $parameters['sign'] = $this->getSign($parameters); | 47 | $parameters['sign'] = $this->getSign($parameters); |
48 | $xmlData = $this->arrayToXml($parameters); | 48 | $xmlData = $this->arrayToXml($parameters); |
49 | $return = $this->xmlToArray($this->postXmlCurl($xmlData, $url, 60)); | 49 | $return = $this->xmlToArray($this->postXmlCurl($xmlData, $url, 60)); |
50 | - dump($return); | ||
51 | return $return; | 50 | return $return; |
52 | } | 51 | } |
53 | private static function postXmlCurl($xml, $url, $second = 30) | 52 | private static function postXmlCurl($xml, $url, $second = 30) |
-
请 注册 或 登录 后发表评论