Supported gateways
| Gateway | Connection | send | sendOtp | balance | OTP service |
|---|---|---|---|---|---|
| SMS EG | smseg | ✓ | ✓ | ✓ | normal or otp (the gateway generates and checks the code) |
| SMS Misr | smsmisr | ✓ | ✓ | ✓ | normal or otp (the package's code is sent through the OTP endpoint) |
| Victory Link | victorylink | ✓ | ✓ | ✓ | normal only |
| Ooredoo | ooredoo | ✓ | ✓ | ✓ | normal only |
| Null (sending turned off) | null | — | — | — | — |
Set the connection with SMS_CONNECTION. The default is null, which turns sending off. Need another gateway? See Custom drivers.
Settings
Every connection reads SMS_USERNAME, SMS_PASSWORD and SMS_SENDER_ID. The table lists the extra settings each one reads in config/sms.php.
| Connection | Extra settings |
|---|---|
smseg | SMS_SERVICE (normal or otp, default normal) |
smsmisr | SMS_SERVICE (normal or otp, default normal), SMS_TOKEN, SMS_MSIGNATURE, SMS_SMS_ID |
victorylink | None |
ooredoo | SMS_CUSTOMER_ID, SMS_BASE_URL (default https://messaging.ooredoo.qa/bms/soap/Messenger.asmx) |
All connections share these settings:
| Setting | Default | Meaning |
|---|---|---|
SMS_MESSAGE | Your verification code is: {code} | The OTP message. See Sending messages. |
SMS_TIMEOUT | 30 | Seconds to wait for a gateway response. |
SMS_CONNECT_TIMEOUT | 10 | Seconds to wait while connecting. |
Gateway response notes
- SMS EG:
send()reports success only for an HTTP 2xx response whosetypeissuccess. This format comes from the package's own code and tests and has not been confirmed against SMS EG's API documentation. - SMS Misr:
send()reports success only for an HTTP 2xx response with code1901. With service otp, thevSMSresponse body is not interpreted, because its format has not been verified. Any HTTP 2xx response counts as sent, sosendOtp()can return a code even when SMS Misr rejected the request inside a 200 response.