Commit b207901c authored by chenchuanwen's avatar chenchuanwen

refund

parent b82cc942
......@@ -61,13 +61,13 @@ class WxPay extends \Payment\TencentPay
public function refund($param){
return $this->commonRefund($param);
// return $this->commonRefund($param);
// return $this->serviceRefund($param);
// if($param['subMchId']){
// return $this->serviceRefund($param);
// }else{
// return $this->commonRefund($param);
// }
if($param['subMchId']){
return $this->serviceRefund($param);
}else{
return $this->commonRefund($param);
}
}
public function serviceRefund($param){
......
......@@ -419,20 +419,15 @@ class RefundReturnModel extends \DAO\AbstractModel
$param['refundFee'] = $orderInfo['refund_amount'];//退款金额
$param['storeId'] = $orderInfo['store_id'];
$param['buyerId'] = $orderInfo['buyer_id'];
$mchIdArray = \DAO\StoreModel::getInstance()->getStoreWxMchId($param['storeId']);
if ($mchIdArray['errorCode'] > 0) {
$this->errorMessage = '微信支付商户错误或者签名错误';
return false;
if (CURRENTVERSION != \Our\NameConst::versionDefault && in_array(intval($orderInfo['payment_type']), array(ApiConst::wxAppPayType, ApiConst::wxProgram))) {
$mchIdArray = \DAO\StoreModel::getInstance()->getStoreWxMchId($param['storeId']);
if ($mchIdArray['errorCode'] > 0) {
$this->errorMessage = '微信支付商户错误或者签名错误';
return false;
}
$param['subMchId'] = $mchIdArray['mchId'];
}
$param['subMchId'] = $mchIdArray['mchId'];
// if (CURRENTVERSION != \Our\NameConst::versionDefault && in_array(intval($orderInfo['payment_type']), array(ApiConst::wxAppPayType, ApiConst::wxProgram))) {
// $mchIdArray = \DAO\StoreModel::getInstance()->getStoreWxMchId($param['storeId']);
// if ($mchIdArray['errorCode'] > 0) {
// $this->errorMessage = '微信支付商户错误或者签名错误';
// return false;
// }
// $param['subMchId'] = $mchIdArray['mchId'];
// }
if (intval($orderInfo['payment_type']) == ApiConst::wxAppPayType) {
$wxpay = \Payment\WxPay::getInstance();
//unset($param['subMchId']);
......
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