@@ -77,16 +77,15 @@ public function update(FormDataRequest $request)
7777 $ message = '<p><strong>IP:</strong> ' .$ request ->ip ().'<br/><strong>Browser:</strong> ' .$ request ->header ('User-Agent ' ).'</p> ' ;
7878
7979 $ ticket_data = json_encode ((object ) [
80- 'message ' => '<h3>Aanvraag ' .env ('APP_NAME ' , 'SiteBoss support form ' ).'</h3><p> ' .nl2br (htmlentities ($ request ->input ('description ' ))).'</p><hr/> ' .$ message ,
80+ 'body ' => '<h3>Aanvraag ' .env ('APP_NAME ' , 'SiteBoss support form ' ).'</h3><p> ' .nl2br (htmlentities ($ request ->input ('description ' ))).'</p><hr/> ' .$ message ,
8181 'email ' => $ request ->input ('email ' ),
82- 'priority ' => 2 ,
8382 'subject ' => $ request ->input ('subject ' ),
83+ 'api_key ' => config ('support.api_key ' )
8484 ]);
8585 $ url = config ('support.endpoint ' );
8686 $ ch = curl_init ($ url );
8787
8888 $ header [] = 'Content-type: application/json ' ;
89- $ header [] = 'Bearer: ' .config ('support.api_key ' );
9089 curl_setopt ($ ch , CURLOPT_POST , true );
9190 curl_setopt ($ ch , CURLOPT_HTTPHEADER , $ header );
9291 curl_setopt ($ ch , CURLOPT_HEADER , false );
@@ -98,7 +97,7 @@ public function update(FormDataRequest $request)
9897 $ info = curl_getinfo ($ ch );
9998
10099 $ response = new LayoutResponse ();
101- if ($ info ['http_code ' ] == 200 && $ server_output -> result == ' ok ' ) {
100+ if ($ info ['http_code ' ] == 200 ) {
102101 $ toast = new Toast (__ ('siteboss::support.done ' ));
103102 $ response ->addAction ($ toast );
104103 } else {
0 commit comments