Commit ba7a12e4 authored by liuyuzhen's avatar liuyuzhen

小程序支付

parent e6a862b6
......@@ -60,7 +60,7 @@ class TencentPay {
$total_fee = $orderInfo['orderAmount'];
$this->parameters['appid']=$this->s_appid;
$this->parameters['mch_id']=$this->s_mch_id;
$this->parameters['sub_appid']=$this->s_appid;
$this->parameters['sub_appid']=$this->appid;
$this->parameters['sub_mch_id']=$orderInfo['subMchId'];
$this->parameters['nonce_str']=\Our\CommonExtension::createNoncestr(32);
$this->parameters['body']='订单号:'.implode(',',$orderInfo['orderSns']);
......@@ -73,7 +73,7 @@ class TencentPay {
$this->parameters['total_fee'] = $total_fee;
}
if(isset($orderInfo['openid'])&&$orderInfo['openid']){
$this->parameters['openid'] = $orderInfo['openid'];
$this->parameters['sub_openid'] = $orderInfo['openid'];
}
$this->parameters['spbill_create_ip']=\Our\Common::getClientIp();
$this->parameters['notify_url']=$this->notify_url;
......@@ -122,7 +122,6 @@ class TencentPay {
{
$xml = $this->createXml();
$this->response = $this->postXmlCurl($xml,$this->pay_url,$this->curl_timeout);
print_r($this->response);
return $this->response;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment