query($sql); $row = $result->fetch_assoc(); $post = [ "account_id" => CASHFREE_APP_ID, "event" => "SUCCESS", "payment_id" => $referenceId, "order_id" => $orderId, "amount" => $orderAmount, "email" => $row['email_id'], "mobile" => $row['mobile_number'] ]; if ($_SERVER['HTTP_HOST'] == 'localhost') { $ch = curl_init('http://localhost/crm11.techlounge.co.in/api/cashfree-notification.php'); } else { $ch = curl_init('https://crm11.techlounge.co.in/api/cashfree-notification.php'); } curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); $response = curl_exec($ch); curl_close($ch); $response; if ($_SERVER['HTTP_HOST'] == 'localhost') { $ch = curl_init('http://localhost/crm2.techlounge.co.in/api/cashfree-notification.php'); } else { $ch = curl_init('https://crm2.techlounge.co.in/api/cashfree-notification.php'); } curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); $response = curl_exec($ch); curl_close($ch); $response; } }