我正在做一个医疗预约申请,并使用日历预订。我能够成功地通过js事件将计划好的事件第一次保存到db中,但无法捕获重调度事件。
function isCalendlyEvent(e) {
return e.data.event && e.data.event.indexOf('calendly') === 0;
};
window.addEventListener(
'message',
function(e) {
if (isCalendlyEvent(e)) {
console.log(e.data);
}
}
);我能够通过"calendly.event_scheduled“事件捕获预定事件,但不能捕获重新调度事件数据。
发布于 2021-09-09 08:06:58
你好,这是一个非常恼人的问题,并没有提供这方面的官方解决方案。没有捕获重新调度事件的此类侦听器。
可能有两个方面的工作:
$scheduleDelete =ScheduledCall::其中(‘id’,$request->scheduleId)->first();$cancelUrl = $scheduleDelete->calendly_cancel_url;$cancelUrl = substr( $cancelUrl,strrpos($cancelUrl,'/') + 1);$cancelUrl= 'https://calendly.com/api/booking/cancellations/‘。$cancelUrl;$data =[‘=> 'cancel_reason’=>‘,'canceled_by’=> 'Nonsulin‘];$payload = json_encode($data);Helper::apiCurlRequest($cancelUrl,'PUT',config('app.CALENDLY_API_KEY'),$payload);$scheduleDelete->删除();
https://stackoverflow.com/questions/69102073
复制相似问题