Commit d81edc2f authored by wwccw0591's avatar wwccw0591

testwxpayLite

parent 427e17de
......@@ -45,11 +45,10 @@ class Pay {
$orderInfo['openid'] = $authInfo['openid'];
$wxLitePay = WxLitePay::getInstance();
$return = $wxLitePay->doPay($orderInfo);
$prepayId = $wxLitePay->getPrepayId();
file_put_contents(\Our\Common::getConfig('out.config') . \Our\PathConst::ktestTime, $prepayId.'|'
.$orderInfo['paySn'] );
$prepayId = $return['prepay_id'];
unset($return['prepay_id']);
\Our\Log::getInstance()->write($prepayId,'/data/log/apptest');
if($prepayId) {
$dbName = \Our\DbNameConst::masterDBConnectName;
\DAO\Order\OrderModel::getInstance($dbName)->update(array('pay_sn'=>$orderInfo['paySn']), array('prepay_id'=>$prepayId));
}
......
......@@ -35,9 +35,12 @@ class WxLitePay extends \Payment\TencentPay{
}
//$this->setRequestParams($orderInfo);
$wxAppParameters = $this->getParameters();
$prepayId = $wxAppParameters['prepay_id'];
unset($wxAppParameters['prepay_id']);
$returnData = array(
'credential'=>array(\Our\NameConst::wxLiteChannel=>$wxAppParameters),
'app_id'=>$this->appid
'app_id'=>$this->appid,
'prepay_id'=>$prepayId
);
return $returnData;
}
......@@ -50,6 +53,8 @@ class WxLitePay extends \Payment\TencentPay{
$wxApiObj['package'] = 'prepay_id='.$this->prepay_id;
$wxApiObj['signType'] = 'MD5';
$wxApiObj["paySign"] = $this->getSign($wxApiObj);
$wxApiObj["prepay_id"] = $this->prepay_id;
return $wxApiObj;
}
......@@ -143,4 +148,4 @@ class WxLitePay extends \Payment\TencentPay{
return self::$_instance;
}
}
\ No newline at end of file
}
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