Commit 877e6453 authored by liuyuzhen's avatar liuyuzhen

支付相关

parent f9115b9c
...@@ -344,6 +344,7 @@ class RefundReturnModel extends \DAO\AbstractModel { ...@@ -344,6 +344,7 @@ class RefundReturnModel extends \DAO\AbstractModel {
} }
if (intval($orderInfo['payment_type']) == ApiConst::wxAppPayType) { if (intval($orderInfo['payment_type']) == ApiConst::wxAppPayType) {
$wxpay = \Payment\WxPay::getInstance(); $wxpay = \Payment\WxPay::getInstance();
unset($param['subMchId']);
$refund_return = $wxpay->refund($param); $refund_return = $wxpay->refund($param);
$this->errorMessage= "微信返回:".json_encode($refund_return); $this->errorMessage= "微信返回:".json_encode($refund_return);
if (!($refund_return['return_code'] == 'SUCCESS' && $refund_return['result_code'] == 'SUCCESS')) { if (!($refund_return['return_code'] == 'SUCCESS' && $refund_return['result_code'] == 'SUCCESS')) {
...@@ -387,7 +388,7 @@ class RefundReturnModel extends \DAO\AbstractModel { ...@@ -387,7 +388,7 @@ class RefundReturnModel extends \DAO\AbstractModel {
$param['refundFee'] = $orderInfo['orderAmount'];//全额退款 $param['refundFee'] = $orderInfo['orderAmount'];//全额退款
$param['storeId']=$orderInfo['storeId']; $param['storeId']=$orderInfo['storeId'];
$param['buyerId']=$orderInfo['buyerId']; $param['buyerId']=$orderInfo['buyerId'];
if(CURRENTVERSION==\Our\NameConst::versionOne&&in_array(intval($orderInfo['payment_type']),array(ApiConst::wxAppPayType,ApiConst::wxProgram))){ if(CURRENTVERSION==\Our\NameConst::versionOne&&in_array(intval($orderInfo['paymentType']),array(\Our\ApiConst::wxAppPayType,\Our\ApiConst::wxProgram))){
$mchIdArray = \DAO\StoreModel::getInstance()->getStoreWxMchId($param['storeId']); $mchIdArray = \DAO\StoreModel::getInstance()->getStoreWxMchId($param['storeId']);
if($mchIdArray['errorCode']>0){ if($mchIdArray['errorCode']>0){
$this->errorMessage = '微信支付商户错误或者签名错误'; $this->errorMessage = '微信支付商户错误或者签名错误';
...@@ -397,9 +398,7 @@ class RefundReturnModel extends \DAO\AbstractModel { ...@@ -397,9 +398,7 @@ class RefundReturnModel extends \DAO\AbstractModel {
} }
if (intval($orderInfo['paymentType']) == ApiConst::wxAppPayType) { if (intval($orderInfo['paymentType']) == ApiConst::wxAppPayType) {
$wxpay = \Payment\WxPay::getInstance(); $wxpay = \Payment\WxPay::getInstance();
if($orderInfo['subMchId']){ unset($param['subMchId']);
$param['subMchId'] = $orderInfo['subMchId'];
}
$refund_return = $wxpay->refund($param); $refund_return = $wxpay->refund($param);
$this->errorMessage= "微信返回:".json_encode($refund_return); $this->errorMessage= "微信返回:".json_encode($refund_return);
if (!($refund_return['return_code'] == 'SUCCESS' && $refund_return['result_code'] == 'SUCCESS')) { if (!($refund_return['return_code'] == 'SUCCESS' && $refund_return['result_code'] == 'SUCCESS')) {
...@@ -419,9 +418,6 @@ class RefundReturnModel extends \DAO\AbstractModel { ...@@ -419,9 +418,6 @@ class RefundReturnModel extends \DAO\AbstractModel {
} }
}else if(intval($orderInfo['paymentType']) == ApiConst::wxProgram){ }else if(intval($orderInfo['paymentType']) == ApiConst::wxProgram){
$wxpay = \Payment\WxLitePay::getInstance(); $wxpay = \Payment\WxLitePay::getInstance();
if($orderInfo['subMchId']){
$param['subMchId'] = $orderInfo['subMchId'];
}
$refund_return = $wxpay->refund($param); $refund_return = $wxpay->refund($param);
if (!($refund_return['return_code'] == 'SUCCESS' && $refund_return['result_code'] == 'SUCCESS')) { if (!($refund_return['return_code'] == 'SUCCESS' && $refund_return['result_code'] == 'SUCCESS')) {
......
...@@ -224,6 +224,8 @@ push.open=1 ...@@ -224,6 +224,8 @@ push.open=1
push.user.service.id=293 push.user.service.id=293
push.user.service.type=7 push.user.service.type=7
password.key='~!@#$`1234qwertasdfgzxcvb'
[develop : common] [develop : common]
; 数据库配置 ; 数据库配置
resources.database.params.driver = "pdo_mysql" resources.database.params.driver = "pdo_mysql"
......
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