test

$username = “082129833199”;
$apiKey = “4605eac9dcd9e3a8”;
$signature = md5($username.$apiKey.’bl’);

$json = ‘{
“commands” : “balance”,
“username” : “082129833199”,
“sign” : “d28a5e66be8579ffc829215855d3d481”
}’;

$url = “https://testprepaid.mobilepulsa.net/v1/legacy/index”;

$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, array(‘Content-Type: application/json’));
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$data = curl_exec($ch);
curl_close($ch);

print_r($data);

$username   = "082129833199";
$apiKey   = "4605eac9dcd9e3a8";
$signature  = md5($username.$apiKey.'bl');

$json = '{
          "commands" : "balance",
          "username" : "082129833199",
          "sign"     : "d28a5e66be8579ffc829215855d3d481"
        }';

$url = "https://testprepaid.mobilepulsa.net/v1/legacy/index";

$ch  = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$data = curl_exec($ch);
curl_close($ch);

print_r($data);