错误:使用smsindiahub发送的短信中的024

问题描述 投票:0回答:1

我使用smsindiahub发送短信,如下所示,但它没有发送消息,

 function send_user_pickup_sms($mobile_number = '', $verification_code = '', $smsemailarray=array(),$date="",$time="") {
    if ($mobile_number != '' && $verification_code != '') {
        //$customer_name    = $userDetails['FirstName'].' '.$userDetails['LastName'];
        $message = 'projectname Order ID '.$verification_code.' picked up on '.$date.' at '.$time.': ';
        foreach($smsemailarray as $item){
           $message .= $item["Qty"].$item["name"].' ';
        }

        $message = urlencode($message);

        //Send Registration code to user via sms
        $apiURL = "http://login.smsindiahub.in/vendorsms/pushsms.aspx?user=" . SMSHUB_USERNAME . "&password=" . SMSHUB_PASSWORD . "&msisdn=" . $mobile_number . "&sid=" . SMSHUB_SENDERID . "&msg=" . $message . "&fl=" . SMSHUB_FLAG . "&gwid=" . SMSHUB_GWID;

        //  Initiate curl
        $ch = curl_init();
        // Set The Response Format to Json
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
        // Disable SSL verification
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        // Will return the response, if false it print the response
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        // Set the url
        curl_setopt($ch, CURLOPT_URL, $apiURL);
        // Execute
        $result = curl_exec($ch);
       echo"<pre>";print_R($result);die;
        // Closing
        curl_close($ch);

        return $result;
    }
    return false;
}

它打印结果如下:

{"ErrorCode":"24","ErrorMessage":"Invalid template or template mismatchInvalid template or template mismatch","JobId":null,"MessageData":null}

我不明白哪里有错,有谁可以帮我解决一下?

php codeigniter sms-gateway
1个回答
2
投票

请在smsindiahub面板中查看。请检查模板的状态。确保您的模板已获批准且未挂起。

谢谢

© www.soinside.com 2019 - 2024. All rights reserved.