串联小程序退款和思信取消预约

wenjuan
yanzai 1 year ago
parent 71e36c3e29
commit becb918fb0

@ -389,4 +389,12 @@ class OrderController extends Controller
$info = $peis::Post($url_code, $hospital, $data); $info = $peis::Post($url_code, $hospital, $data);
return $info; return $info;
} }
public function cancel_appointment($hospital, $data)
{
$peis = new PEISApiController();
$url_code = $data['type'] == 1 ? '个检预约取消' : '团检预约取消';
unset($data['type']);
$info = $peis::Post($url_code, $hospital, $data);
return $info;
}
} }

@ -102,7 +102,12 @@ class PayController extends Controller
if ($orderInfo->status !==2) return \Yz::echoError1("订单状态异常。当前状态:" . $orderInfo->status); if ($orderInfo->status !==2) return \Yz::echoError1("订单状态异常。当前状态:" . $orderInfo->status);
if ($orderInfo->check_status ==2) return \Yz::echoError1("已登记体检,禁止退款"); if ($orderInfo->check_status ==2) return \Yz::echoError1("已登记体检,禁止退款");
//调用思信取消,恢复号源 //调用思信取消,恢复号源
$ap=new OrderController();
$cancel= $ap->cancel_appointment($orderInfo->hospital_id,[
'type' => $orderInfo->type,
'预约Id' => $orderInfo->appointment_number
]);
if($cancel['code']!=0) return \Yz::echoError1("取消预约失败,".$cancel['message']);
//退款 //退款
$data=[ $data=[
'orderid'=>$orderInfo->order_number, 'orderid'=>$orderInfo->order_number,

Loading…
Cancel
Save