|
@@ -37,6 +37,7 @@ class Sms
|
|
|
|
|
|
private function send_msg($mobile, $datas, $type)
|
|
|
{
|
|
|
+ Log::record("SMS send:{$mobile} " . json_encode($datas) . " {$type}", Log::DEBUG);
|
|
|
$folder = 'yuntx';
|
|
|
$plugin = str_replace('\\', '', str_replace('/', '', str_replace('.', '', $folder)));
|
|
|
if (!empty($plugin)) {
|
|
@@ -44,7 +45,13 @@ class Sms
|
|
|
require_once(PLUGIN_ROOT . DS . $plugin . DS . 'CCPRestSDK.php');
|
|
|
require_once(PLUGIN_ROOT . DS . $plugin . DS . 'SendSMS.php');
|
|
|
|
|
|
- return sendSMS($mobile, $datas, $type);
|
|
|
+ $datas_param = array();
|
|
|
+ foreach($datas as $key=>$val)
|
|
|
+ {
|
|
|
+ $datas_param[] = $val;
|
|
|
+ }
|
|
|
+
|
|
|
+ return sendSMS($mobile, $datas_param, $type);
|
|
|
} else {
|
|
|
return -1;
|
|
|
}
|
|
@@ -69,6 +76,10 @@ class Sms
|
|
|
unset($content['type']);
|
|
|
}
|
|
|
|
|
|
+ if(array_key_exists('mobile',$content)) {
|
|
|
+ unset($content['mobile']);
|
|
|
+ }
|
|
|
+
|
|
|
static $templates = array(self::register_code => '59006', self::resetpass_code => '63477', self::getbonus_code => '63479', self::getbind_code => '59006', self::bindbonus_register_code => '92893');
|
|
|
if (!array_key_exists($type, $templates)) return -1;
|
|
|
|