Commit 6326f4bc authored by liuyuzhen's avatar liuyuzhen

硒鼓

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