How can i get status update for mobile transaction in php


require_once 'paynow/autoloader.php';

    $paynow = new Paynow\Payments\Paynow(
$payment = $paynow->createPayment('Invoice 35', '[email protected]');

$payment->add('Bananas', 21.50);
$payment->add('Apples', 31.40);

$response = $paynow->sendMobile($payment, '0771111111', 'ecocash');

if($response->success()) {
    $pollUrl = $response->pollUrl();
   $status = $paynow->pollTransaction($pollUrl);
    //listen to status update changes using ajax after test
   if($status->paid()) {     
    echo "Paid";
      } else {
        echo "No payment done yet";
}else {
  echo "Not successful <br>";


I have tried to follow other almost similar forums but they don’t seem to address my issue. I wish i could simply get a status update in a string. I understand the pollurl idea a little but i have no enough programming experience to follow the directions to poll for a status update as shown in May i have a simple way to get status update from the poll url or at the least dumbed down directions on how to poll for a status update.


You have to right your own logic to check for the status, use javascript