Script API Request Saldo Deposit
Contoh Script PHP API Request Saldo Deposit:
Contoh Response Sukses API Request Saldo Deposit:
Contoh Response Gagal API Request Saldo Deposit:
<?php
$url = 'http://portalpulsa.com/api/connect/';
$header = array(
'portal-userid: useridAnda',
'portal-key: keyAnda', // lihat hasil autogenerate di member area
'portal-secret: secretAnda', // lihat hasil autogenerate di member area
);
$data = array(
'inquiry' => 'D', // konstan
'bank' => 'bca', // bank tersedia: bca, bni, mandiri, bri, muamalat
'nominal' => 100000, // jumlah request
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
echo $result; // ini berupa data json
$url = 'http://portalpulsa.com/api/connect/';
$header = array(
'portal-userid: useridAnda',
'portal-key: keyAnda', // lihat hasil autogenerate di member area
'portal-secret: secretAnda', // lihat hasil autogenerate di member area
);
$data = array(
'inquiry' => 'D', // konstan
'bank' => 'bca', // bank tersedia: bca, bni, mandiri, bri, muamalat
'nominal' => 100000, // jumlah request
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
echo $result; // ini berupa data json
Contoh Response Sukses API Request Saldo Deposit:
{
"result": "success",
"message": "Silakan transfer sebesar Rp 100.972,- Ke Rekening: BCA, no. 0770520207, a.n. BENY ARIF L. Batas waktu transfer 1x24jam"
}
"result": "success",
"message": "Silakan transfer sebesar Rp 100.972,- Ke Rekening: BCA, no. 0770520207, a.n. BENY ARIF L. Batas waktu transfer 1x24jam"
}
Contoh Response Gagal API Request Saldo Deposit:
{
"result": "failed",
"message": "Nominal harus kelipatan 1000"
}
{
"result": "failed",
"message": "Nominal tidak valid."
}
{
"result": "failed",
"message": "Maksimal deposit adalah 1000000000"
}
{
"result": "failed",
"message": "Minimal deposit adalah 10000"
}
{
"result": "failed",
"message": "Bank yang Anda minta tidak tersedia"
}
{
"result": "failed",
"message": "Bank BRI sedang gangguan"
}
"result": "failed",
"message": "Nominal harus kelipatan 1000"
}
{
"result": "failed",
"message": "Nominal tidak valid."
}
{
"result": "failed",
"message": "Maksimal deposit adalah 1000000000"
}
{
"result": "failed",
"message": "Minimal deposit adalah 10000"
}
{
"result": "failed",
"message": "Bank yang Anda minta tidak tersedia"
}
{
"result": "failed",
"message": "Bank BRI sedang gangguan"
}
ConversionConversion EmoticonEmoticon