作者 王晓刚
1 个管道 的构建 通过 耗费 2 秒

托管成功短信提示

... ... @@ -432,20 +432,16 @@ class FormController extends WeChatBaseController
$this->template($templateId,$data2,$url,$user1['openid']);
//短信通知
$data = array(
'content' => "【橙象保险】尊敬的用户您的保单即将生效,保单号为$collocation[insurance_num]",//短信内容
'content' => "【橙象保险】尊敬的用户您的保单即将生效,保单号为$collocation[insurance_num]",//短信内容
'mobile' => $user['mobile'],//手机号码
'productid' => '887361',//产品id
'xh' => ''//小号
);
$result = send_sms($data);
dump($result);
exit();
if(substr($result,0,strpos($result,',')) != "1"){
$arr['code'] = 40000;
$arr['msg'] = '短信接口出错';
return json_encode($arr);
}else{
echo 1;
}
}
$arr['code'] = 20000;
... ...
... ... @@ -119,6 +119,15 @@ class PayController extends HomeBaseController
$url = '';
$user1 = Db::name('third_party_user')->where('user_id',$order['user_id'])->find();
$this->template($templateId,$data1,$url,$user1['openid']);
//短信通知
$user = Db::name('user')->where('id',$order['user_id'])->find();
$data = array(
'content' => "【橙象保险】尊敬的用户您的保单即将生效,保单号为$collocation[insurance_num]。",//短信内容
'mobile' => $user['mobile'],//手机号码
'productid' => '887361',//产品id
'xh' => ''//小号
);
$result = send_sms($data);
} else { // 用户支付失败
$update['status']=2;
}
... ...