craftsys / msg91-laravel

Send SMS, OTP in Laravel using Msg91 Apis
MIT License
13 stars 6 forks source link

Path incorrect: `vendor\craftsys\msg91-php\src./` instead of `vendor\craftsys\msg91-php\src/` (dot extra) #17

Closed anburocky3 closed 5 days ago

anburocky3 commented 1 week ago
require(S:\laragon6\www\project\vendor\craftsys\msg91-php\src./../config/msg91.php): Failed to open stream: Permission denied

This exception happens when trying to send SMS.

    private function sendOtp($mobileNo, $otp): bool
    {
        $mobileNo = '91'.$mobileNo; // Assuming Indian numbers, add country code

        try {
            $response = MSG91::otp($otp)
                ->to($mobileNo)
                ->template(config('services.msg91.senderId')) // Replace with your actual template ID
                ->send();

            return $response->getData()['type'] === 'success';
        } catch (Exception $e) {
            Log::error('MSG91 OTP sending failed: '.$e->getMessage());
            dd($e);

            return false;
        }
    }
sudkumar commented 5 days ago

Tacking here https://github.com/craftsys/msg91-php/issues/13

sudkumar commented 5 days ago

:tada: This issue has been resolved in version 0.15.1 :tada:

The release is available on GitHub release