Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 753 Bytes

File metadata and controls

40 lines (30 loc) · 753 Bytes

Check for Service Availability

viewServiceAvailability() creates a GET request to /heartbeat

This endpoint returns the current status of the API.

Usage/Examples

<?php
require_once __DIR__ . './../bootstrap.php';
use mmpsdk\Common\Exceptions\MobileMoneyException;
use mmpsdk\AgentService\AgentService;

try {
     * Construct request object and set desired parameters
     */
    $request = AgentService::viewServiceAvailability();

    /**
     *Execute the request
     */
    $response = $request->execute();

    print_r($response);
} catch (MobileMoneyException $ex) {
    print_r($ex->getMessage());
    print_r($ex->getErrorObj());
}

Example Output

stdClass Object
(
    [serviceStatus] => available
)