No products in the cart.
- ৳ 35,000
৳ 40,000 - ৳ 10,500
৳ 15,500 - ৳ 16,000
৳ 19,000 - ৳ 17,000
৳ 20,000 - ৳ 18,500
৳ 19,000 - ৳ 1,000
৳ 1,500 - ৳ 45,000
৳ 55,000 - ৳ 14,500
৳ 15,500 - ৳ 60,000
৳ 70,000 - ৳ 75,000
৳ 85,000
add_action('wpcf7_mail_sent', 'send_sms_after_form');function send_sms_after_form($contact_form) {// Get form submission $submission = WPCF7_Submission::get_instance(); if (!$submission) return;$data = $submission->get_posted_data();// Get form fields (must match CF7) $phone = isset($data['your-phone']) ? trim($data['your-phone']) : ''; $name = isset($data['your-name']) ? sanitize_text_field($data['your-name']) : 'Customer';// Stop if no phone if (empty($phone)) return;// Convert 019XXXXXXXX → 88019XXXXXXXX $phone = preg_replace('/^0/', '880', $phone);// API URL $url = "https://isms.gennet.com.bd/api/v3/send-sms";// SMS Data $sms_data = [ "api_token" => "PASTE_YOUR_NEW_API_TOKEN_HERE", "sid" => "ShojonSheba", "msisdn" => $phone, "sms" => "Hello $name, আপনার রিকোয়েস্ট আমরা পেয়েছি। ধন্যবাদ!", "csms_id" => uniqid() ];// Request args $args = [ 'body' => json_encode($sms_data), 'headers' => [ 'Content-Type' => 'application/json' ], 'timeout' => 20 ];// Send SMS $response = wp_remote_post($url, $args);// Debug log if (is_wp_error($response)) { error_log('SMS Error: ' . $response->get_error_message()); } else { $body = wp_remote_retrieve_body($response); error_log('SMS Response: ' . $body); } }
Medical Stall – Reliable Medical Equipment Provider in Bangladesh