|
@@ -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';
|
|
@@ -151,7 +151,7 @@ class RecharOrder extends Model
|
|
|
}
|
|
|
} catch (Exception $e) {
|
|
|
$result['status'] = 0;
|
|
|
- $result['msg'] = '';
|
|
|
+ $result['msg'] = $e->getMessage();
|
|
|
}
|
|
|
return $result;
|
|
|
}
|