Edujugon / PushNotification

PHP and Laravel Package to send push notifications to Android and IOS devices.
MIT License
478 stars 159 forks source link

about fcm sending message #19

Closed ha-family closed 7 years ago

ha-family commented 7 years ago

hello, could you help me ? my laravel application running perfectly with apn. but i got some problem with fcm

PushNotification::setService('fcm') ->setMessage([ 'notification' => [ 'title'=>'This is the title', 'body'=>'This is the message', 'sound' => 'default' ], 'data' => [ 'extraPayLoad1' => 'value1', 'extraPayLoad2' => 'value2' ] ]) ->setApiKey('Server-API-Key') ->setDevicesToken(['deviceToken1']) ->send() ->getFeedback();

after i sending message, it shows {#309 +"success": false +"error": "cURL error 51: SSL: certificate verification failed (result: 5) (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)" }

i don't know how to fix it, could you help me?

Edujugon commented 7 years ago

Hi @liu-yuhuan , That seems to be an issue related to curl no to this package. I advise you to focus your research on curl topic.

Anyway,In order to be able to reproduce your error, could you send me to edujugon@gmail.com your server api key and one device token?

I'll test so as soon as I get some free time :)

ha-family commented 7 years ago

my apache missing some package cause the problem.

thank you @Edujugon for helping me.