- //国内转发国外的阿里云短信发送请求 index.php
- require './vendor/aliyun/sendSms.php';
- $option = $_POST;
- $result = sendSms($option);
- echo json_encode($result);
- /addons/ewei_shopv2/core/com/sms.php
- else if ($template['type'] == 'aliyun_new') {
- include_once EWEI_SHOPV2_VENDOR . 'aliyun/sendSms.php';
- $option = array('keyid' => $smsset['aliyun_new_keyid'], 'keysecret' => $smsset['aliyun_new_keysecret'], 'phonenumbers' => $mobile, 'signname' => $template['smssign'], 'templatecode' => $template['smstplid'], 'templateparam' => $params);
- //$result = sendSms($option);//注释掉
- //转发到国内短信发送平台 start
- $resultx = ihttp_post('http://www.wxstock.test/sms/index.php', $option);
- //接受返回结果
- $result = json_decode($resultx['content'], true);
- //转发到国内短信发送平台 end
- if ($result['Message'] != 'OK') {
- return array('status' => 0, 'message' => '短信发送失败(错误信息: ' . $result['Message'] . ')');
- }
- }
复制代码 |