|
|
@@ -2,6 +2,7 @@
|
|
|
namespace common\components;
|
|
|
|
|
|
use common\helpers\LoggerTool;
|
|
|
+use common\models\Countries;
|
|
|
use common\models\SmsRecord;
|
|
|
use ElkenGit\EknotifierPHP\EknotifierSms;
|
|
|
|
|
|
@@ -24,16 +25,19 @@ class EknotifierSmsDriver implements SmsDriverInterface
|
|
|
$applicationCode = \Yii::$app->params['sms']['url'];
|
|
|
$applicationPassword = \Yii::$app->params['sms']['url'];
|
|
|
|
|
|
+ $zoneCode = Countries::getZoneCodeById($countryId);
|
|
|
+
|
|
|
$eknotifierSms = new EknotifierSms($eknotifierUrl, $applicationCode, $applicationPassword);
|
|
|
$response = $eknotifierSms->sendSMS($mobile, $message, $userId);
|
|
|
|
|
|
- LoggerTool::debug(json_encode(['eknotifierSms', $eknotifierUrl, $applicationCode, $applicationPassword, $mobile, $message, $userId, $eknotifierSms, $response]));
|
|
|
+ LoggerTool::debug(['eknotifierSms', $eknotifierUrl, $applicationCode, $applicationPassword, $mobile, $zoneCode, $message, $userId, $eknotifierSms, $response]);
|
|
|
|
|
|
$record = new SmsRecord();
|
|
|
$record->USER_ID = $userId;
|
|
|
$record->CLASSIFY = $classify;
|
|
|
$record->COUNTRY_ID = $countryId;
|
|
|
$record->MOBILE = $mobile;
|
|
|
+ $record->ZONE_CODE = $zoneCode;
|
|
|
$record->CONTENT = $message;
|
|
|
$record->RESULT = '';
|
|
|
$record->save();
|