diff --git a/app/Controller/CallBackController.php b/app/Controller/CallBackController.php index 43fd25c..3fa4595 100644 --- a/app/Controller/CallBackController.php +++ b/app/Controller/CallBackController.php @@ -306,19 +306,21 @@ class CallBackController extends AbstractController // 发送推送消息 if ($inquiry_refund_status == 3) { try { + // 发送站内、订阅、短信消息-问诊服务退款成功 + $MessagePush = new MessagePush($order_inquiry['user_id'], $order_inquiry['order_inquiry_id']); + + // 取消订单原因(1:医生未接诊 2:主动取消 3:无可分配医生 4:客服取消 5:支付超时) + if ($order_inquiry['cancel_reason'] == 1) { + $MessagePush->refundInquirySuccess(1); + + } elseif ($order_inquiry['cancel_reason'] == 2) { + $MessagePush->refundInquirySuccess(3); + + } elseif ($order_inquiry['cancel_reason'] == 3) { + $MessagePush->refundInquirySuccess(2); + } + if (!empty($order_inquiry['coupon_amount_total']) && $order_inquiry['coupon_amount_total'] > 0) { - // 发送站内、订阅、短信消息-问诊服务退款成功 - $MessagePush = new MessagePush($order_inquiry['user_id'], $order_inquiry['order_inquiry_id']); - - // 取消订单原因(1:医生未接诊 2:主动取消 3:无可分配医生 4:客服取消 5:支付超时) - if ($order_inquiry['cancel_reason'] == 1) { - $MessagePush->refundInquirySuccess(1); - } elseif ($order_inquiry['cancel_reason'] == 2) { - $MessagePush->refundInquirySuccess(3); - } elseif ($order_inquiry['cancel_reason'] == 3) { - $MessagePush->refundInquirySuccess(2); - } - // 发送站内消息-优惠卷退还 $MessagePush = new MessagePush($order_inquiry['user_id'], $order_inquiry['order_inquiry_id']); $MessagePush->patientRefundCoupon();