mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +09:00
Add dummy SMS driver and use it as the default
This commit is contained in:
parent
582374295d
commit
50e3dc4574
4 changed files with 63 additions and 12 deletions
|
|
@ -57,6 +57,10 @@ class SMS
|
|||
$default_driver_config = config('sms.' . $default_driver) ?: array();
|
||||
self::$default_driver = $default_driver_class::getInstance($default_driver_config);
|
||||
}
|
||||
else
|
||||
{
|
||||
self::$default_driver = Drivers\SMS\Dummy::getInstance(array());
|
||||
}
|
||||
}
|
||||
return self::$default_driver;
|
||||
}
|
||||
|
|
@ -595,11 +599,11 @@ class SMS
|
|||
}
|
||||
|
||||
// Check the country code.
|
||||
if ($item->type === 'MMS' && is_array($spec['mms_supported_country_codes']) && !in_array($country_code, $spec['mms_supported_country_codes']))
|
||||
if ($item->type === 'MMS' && $country_code && is_array($spec['mms_supported_country_codes']) && !in_array($country_code, $spec['mms_supported_country_codes']))
|
||||
{
|
||||
$item->type = 'LMS';
|
||||
}
|
||||
if ($item->type === 'LMS' && is_array($spec['lms_supported_country_codes']) && !in_array($country_code, $spec['lms_supported_country_codes']))
|
||||
if ($item->type === 'LMS' && $country_code && is_array($spec['lms_supported_country_codes']) && !in_array($country_code, $spec['lms_supported_country_codes']))
|
||||
{
|
||||
$item->type = 'SMS';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue