robincsamuel / laravel-msg91

Package for MSG91 sms API
MIT License
8 stars 12 forks source link

$msgtype errror #5

Closed jigs1212 closed 5 years ago

jigs1212 commented 5 years ago

$result = LaravelMsg91::verifyOtp(919090909090, 1290); // returns true or false while using the above method receiving stdClass error.

$result = LaravelMsg91::verifyOtp(919090909090, 1290, ['raw' => true]); // returns what msg91 replies (includes error message & type) i found that using the above the object received doesnot have $msgType and only has {message: '', type:'success'}

please update the following line return json_decode($response->getBody())->msgType == 'success' ? true : false; to return json_decode($response->getBody())->type == 'success' ? true : false;

robincsamuel commented 5 years ago

@jigs1212 I think msg91 recently changed this, it was msgType. I'll check and update. Or if you have changed it and verified already, a PR is appreciated :)

robincsamuel commented 5 years ago

Nevermind, I've checked the docs & updated, Thanks! :)