Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement