@@ -242,7 +242,7 @@ public function postNotification($data = [], $app_id = '')
242242 $ headers [ 'json ' ] = $ clean_data ;
243243
244244 // Return the Response from the OneSignal API
245- return $ this ->post ("/ notifications " , $ headers );
245+ return $ this ->post ("notifications " , $ headers );
246246 }
247247
248248 /**
@@ -255,12 +255,12 @@ public function postNotification($data = [], $app_id = '')
255255 */
256256 public function putNotificationTrackOpen ($ id , $ app_id = '' , $ opened = true )
257257 {
258- $ headers = $ this ->headerInit ();
258+ $ headers = $ this ->headerInit (false , true );
259259 if ($ app_id == '' ) {
260260 $ app_id = $ this ->appId ;
261261 }
262- $ headers [ 'app_id ' ] = $ app_id ;
263- $ headers [ 'opened ' ] = $ opened ;
262+ $ headers [ 'json ' ][ ' app_id ' ] = $ app_id ;
263+ $ headers [ 'json ' ][ ' opened ' ] = $ opened ;
264264
265265 return $ this ->put ("notifications/ $ {id}" , $ headers );
266266 }
@@ -274,7 +274,7 @@ public function putNotificationTrackOpen($id, $app_id = '', $opened = true)
274274 */
275275 public function deleteNotification ($ id , $ app_id = '' )
276276 {
277- $ headers = $ this ->headerInit (false , true );
277+ $ headers = $ this ->headerInit ( false , true );
278278 if ($ app_id == '' ) {
279279 $ app_id = $ this ->appId ;
280280 }
0 commit comments