|
|
@@ -565,8 +565,10 @@ class PaymentService extends BaseService
|
|
|
$orderNo = isset($orderInfo['order_no'])? $orderInfo['order_no'] : '';
|
|
|
$account = isset($orderInfo['account'])? $orderInfo['account'] : '';
|
|
|
$total = isset($orderInfo['pay_money'])? $orderInfo['pay_money'] : 0;
|
|
|
+ $payTotal = isset($orderInfo['pay_total'])? $orderInfo['pay_total'] : 0;
|
|
|
$amount = $total;
|
|
|
$params = [
|
|
|
+ 'price'=>$payTotal,
|
|
|
'ytype'=>isset($orderInfo['ytype'])?$orderInfo['ytype']:0,
|
|
|
'id_card_no'=>isset($orderInfo['id_card_no'])?$orderInfo['id_card_no']:'',
|
|
|
'area'=>isset($orderInfo['area'])?$orderInfo['area']:'',
|
|
|
@@ -584,10 +586,10 @@ class PaymentService extends BaseService
|
|
|
$this->error = '充值调用失败:'.$errmsg;
|
|
|
|
|
|
// 退款
|
|
|
- $orderInfo['money'] = $total;
|
|
|
+ $orderInfo['money'] = $payTotal;
|
|
|
$orderInfo['remark'] = '充值失败退款';
|
|
|
$refundStatus = PaymentService::make()->refund($orderInfo,'pay');
|
|
|
- $updateData = ['refund_status'=> $refundStatus?1:3,'status'=>5,'result'=>json_encode(['amount'=>$amount,'params'=>$params,'result'=>$result],256),'failed_remark'=> $errmsg,'refund_money'=>$refundStatus?$total:0,'update_time'=>time()];
|
|
|
+ $updateData = ['refund_status'=> $refundStatus?1:3,'status'=>5,'result'=>json_encode(['amount'=>$amount,'params'=>$params,'result'=>$result],256),'failed_remark'=> $errmsg,'refund_money'=>$refundStatus?$payTotal:0,'update_time'=>time()];
|
|
|
$this->saveLog("caches:payments:notify_{$scene}:pay_failed_{$orderNo}_{$orderUserId}", ['error'=>$this->error,'update'=>$updateData,'order' => $orderInfo,'result'=>$result, 'notify' => $data]);
|
|
|
if(!PayOrdersModel::where(['id'=>$orderId])->update($updateData)){
|
|
|
$this->error = '订单退款状态更新错误~';
|