Now Hiring: Are you a driven and motivated 1st Line IT Support Engineer?

Get USSD requests – PHP Integration

Get USSD requests – PHP Integration

  • </pre>
    <pre class="prettyprint prettyprinted"><span class="kwd">try</span> <span class="pun">{</span>
        <span class="com">// Get a USSD request using the ID.</span><span class="pln">
        $ussdRequest </span><span class="pun">=</span><span class="pln"> getUssdRequestByID</span><span class="pun">(</span><span class="lit">1</span><span class="pun">);</span><span class="pln">
        print_r</span><span class="pun">(</span><span class="pln">$ussdRequest</span><span class="pun">);</span>
        
        <span class="com">// Get USSD requests with request text "*150#" sent in last 24 hours.</span><span class="pln">
        $ussdRequests </span><span class="pun">=</span><span class="pln"> getUssdRequests</span><span class="pun">(</span><span class="str">"*150#"</span><span class="pun">,</span> <span class="kwd">null</span><span class="pun">,</span> <span class="kwd">null</span><span class="pun">,</span><span class="pln"> time</span><span class="pun">()</span> <span class="pun">-</span> <span class="lit">86400</span><span class="pun">);</span><span class="pln">
        print_r</span><span class="pun">(</span><span class="pln">$ussdRequests</span><span class="pun">);</span>
    <span class="pun">}</span> <span class="kwd">catch</span> <span class="pun">(</span><span class="typ">Exception</span><span class="pln"> $e</span><span class="pun">)</span> <span class="pun">{</span><span class="pln">
        echo $e</span><span class="pun">-></span><span class="pln">getMessage</span><span class="pun">();</span>
    <span class="pun">}</span></pre>
    <pre>

Leave your thought here

Your email address will not be published. Required fields are marked *