浏览代码

退款调试

zhangxiaobin 1 年之前
父节点
当前提交
4fbc0d2bbd
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      application/admin/model/RecharOrder.php

+ 5 - 5
application/admin/model/RecharOrder.php

@@ -87,19 +87,19 @@ class RecharOrder extends Model
                 //
                 if ($order['pay_type'] == 1) {
                     $wxpay = new \app\common\library\Wxpay;
-                    $result = $wxpay->WxPayRefund($order_data);
+                    $wxresult = $wxpay->WxPayRefund($order_data);
                     // 微信通知回调 pay->notifyr
-                    if ($result['return_code'] == 'SUCCESS' && $result['result_code'] == 'SUCCESS') {
+                    if ($wxresult['return_code'] == 'SUCCESS' && $wxresult['result_code'] == 'SUCCESS') {
                         Db::name('order_refund_log')->where('id',$refund_log_id)->update(['status'=>1]);
                     } else {
                         throw new Exception($result['return_msg']);
                     }
                 } elseif ($order['pay_type'] == 2) {
-                    $result = Service::submitRefund($order['pay_fee'],$refund_price,$order['pay_out_trade_no'],$refund_data['out_refund_no'],'alipay',$remark,'');
-                    if($result['code'] == '10000'){
+                    $aliresult = Service::submitRefund($order['pay_fee'],$refund_price,$order['pay_out_trade_no'],$refund_data['out_refund_no'],'alipay',$remark,'');
+                    if($aliresult['code'] == '10000'){
                         Db::name('order_refund_log')->where('id',$refund_log_id)->update(['status'=>1]);
                     }else{
-                        throw new Exception($result['msg']);
+                        throw new Exception($aliresult['msg']);
                     }
 
                     /* return 'alipay wrong way';