Edujugon / PushNotification

PHP and Laravel Package to send push notifications to Android and IOS devices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

about fcm sending message

ha-family opened this issue · comments

commented

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?

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 :)

commented

my apache missing some package cause the problem.

thank you @Edujugon for helping me.