Commit 6326f4bc authored by liuyuzhen's avatar liuyuzhen

硒鼓

parent 5898fa84
...@@ -49,6 +49,7 @@ class TencentPay { ...@@ -49,6 +49,7 @@ class TencentPay {
$this->parameters['spbill_create_ip']=\Our\Common::getClientIp(); $this->parameters['spbill_create_ip']=\Our\Common::getClientIp();
$this->parameters['notify_url']=$this->notify_url; $this->parameters['notify_url']=$this->notify_url;
$this->parameters['trade_type']= $this->tradeType; $this->parameters['trade_type']= $this->tradeType;
\Our\Log::getInstance()->write(json_encode($this->parameters),'/data/log/apptest');
//$this->parameters['openid']=$_SESSION['openid']; //$this->parameters['openid']=$_SESSION['openid'];
//print_r($this->parameters);exit; //print_r($this->parameters);exit;
$prepay_id = $this->getPrepayId(); $prepay_id = $this->getPrepayId();
...@@ -80,6 +81,7 @@ class TencentPay { ...@@ -80,6 +81,7 @@ class TencentPay {
$this->parameters['spbill_create_ip']=\Our\Common::getClientIp(); $this->parameters['spbill_create_ip']=\Our\Common::getClientIp();
$this->parameters['notify_url']=$this->notify_url; $this->parameters['notify_url']=$this->notify_url;
$this->parameters['trade_type']= $this->tradeType; $this->parameters['trade_type']= $this->tradeType;
\Our\Log::getInstance()->write(json_encode($this->parameters),'/data/log/apptest');
//$this->parameters['openid']=$_SESSION['openid']; //$this->parameters['openid']=$_SESSION['openid'];
//print_r($this->parameters);exit; //print_r($this->parameters);exit;
$prepay_id = $this->getPrepayId(); $prepay_id = $this->getPrepayId();
...@@ -337,6 +339,7 @@ class TencentPay { ...@@ -337,6 +339,7 @@ class TencentPay {
*/ */
public function getNotifyInfo() { public function getNotifyInfo() {
$xml = file_get_contents("php://input"); $xml = file_get_contents("php://input");
\Our\Log::getInstance()->write(json_encode($xml),'/data/log/apptest');
$this->saveData($xml); $this->saveData($xml);
$verify = false; $verify = false;
if($this->checkSign() == FALSE){ if($this->checkSign() == FALSE){
......
...@@ -15,7 +15,7 @@ class WxPay extends \Payment\TencentPay ...@@ -15,7 +15,7 @@ class WxPay extends \Payment\TencentPay
public function __construct() public function __construct()
{ {
$this->appid = \Our\PayConst::wxPayAppId; $this->appid = \Our\PayConst::wxPayAppId;
$this->notify_url = \Our\NameConst::httpPrefix . $_SERVER['SERVER_NAME'] . \Our\PayConst::wxAppNotifyUrl; $this->notify_url = \Our\Common::getBaseUrl().\Our\PayConst::wxAppNotifyUrl;
$this->mch_id = \Our\PayConst::wxPayMchId; $this->mch_id = \Our\PayConst::wxPayMchId;
$this->key = \Our\PayConst::wxPayKey; $this->key = \Our\PayConst::wxPayKey;
$this->sslcert_path = \Our\PayConst::wxSslcertPath; $this->sslcert_path = \Our\PayConst::wxSslcertPath;
......
...@@ -52,6 +52,7 @@ class PaymentServiceModel extends \Business\AbstractModel{ ...@@ -52,6 +52,7 @@ class PaymentServiceModel extends \Business\AbstractModel{
$param['pay_type'] = \Our\ApiConst::wxAppPayType; $param['pay_type'] = \Our\ApiConst::wxAppPayType;
} }
$callbackInfo = $wxpay->getNotifyInfo(); $callbackInfo = $wxpay->getNotifyInfo();
\Our\Log::getInstance()->write(json_encode($callbackInfo),'/data/log/apptest');
if($callbackInfo) { if($callbackInfo) {
//验证成功 //验证成功
$param['paySn'] = $callbackInfo['out_trade_no']; $param['paySn'] = $callbackInfo['out_trade_no'];
......
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