Skip to content

Instantly share code, notes, and snippets.

@hackerrahul
Last active July 2, 2019 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hackerrahul/6f8b77928dcbfc2c3560b9bd4f93ce39 to your computer and use it in GitHub Desktop.
Save hackerrahul/6f8b77928dcbfc2c3560b9bd4f93ce39 to your computer and use it in GitHub Desktop.
<?php
function check_balance($api_key){
$url = 'https://api.paysify.com/balance_api?api_key='.$api_key;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
$response = json_decode($result,true);
curl_close($ch);
return $response;
}
$api_key = "YOUR_API_KEY";
$data = check_balance($api_key);
echo "<pre>";
print_r($data);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment