dimanche 19 février 2017

chikka api (Receiving SMS)

I have a problem in receiving a SMS from chikka API. I have tried the code posted in their documentation here's the code:

try
{
    $message_type = $_POST["message_type"];
}
catch (Exception $e)
{
    echo "Error";
    exit(0);
}

if (strtoupper($message_type) == "INCOMING")
{
    try
    {
        $message = $_POST["message"];
        $mobile_number = $_POST["mobile_number"];
        $shortcode = $_POST["shortcode"];
        $timestamp = $_POST["timestamp"];
        $request_id = $_POST["request_id"];

        echo "Accepted";
        exit(0);
    }
    catch (Exception $e)
    {
        echo "Error";
        exit(0);
    }
}
else
{
    echo "Error";
    exit(0);
}

but it only returns error. And I am working on how to process the message sent by the API but it doesn't work. I am new to this API.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2kOJFwl
via IFTTT

Aucun commentaire:

Enregistrer un commentaire