/** * Returns the attached API's wallet balance. If there is specified currency, then the requesting currency balance * is returned. * For more information see: https://www.egopay.com/developers/api * Since v1.0 * @param null $sCurrency * @return null|object */ public function getBalance($sCurrency = null) { $this->_setupCredentials(); $oBalance = $this->_oClient->balance(); $this->_checkError($oBalance); if ($sCurrency !== null) { if (isset($oBalance->{$sCurrency})) { return $oBalance->{$sCurrency}; } else { return null; } } return $oBalance; }
public function GetCredit() { $client = new SoapClient($this->wsdl_link); $result = $client->balance($this->username, $this->password); return $result; }
$response = $client->send($apicode, $_SESSION['user']['wallet'], $prize, 1); if ($response['status'] > 0) { $wait = $now + $setinterval * 60; $db->query("update tbl_user set `reset`='{$wait}',playnum=playnum+1,earn=earn+'{$prize}',ip='{$ip}' where user_id='" . $_SESSION['user']['uid'] . "'"); $_SESSION['user']['succ'] = $prize; if ($_SESSION['user']['refid']) { $refearn = floor($prize * $ref_percent / 100); $db2->queryres("select wallet from tbl_user where user_id='" . $_SESSION['user']['refid'] . "'"); $response = $client->send($apicode, $db2->res['wallet'], $refearn, 2, 'Referral earnings.'); } unset($_SESSION['error']); unset($_SESSION['prize']); } else { $_SESSION['error']['epay'] = true; } $amount_bb = $client->balance($apicode, $_SESSION['user']['wallet']); $_SESSION['user']['amount'] = $amount_bb; } else { unset($_SESSION['user']); unset($_SESSION['error']); $_SESSION['error']['capt'] = true; } header('Location:index.php'); } else { $wallet = $_SESSION['user']['wallet']; $db->queryres("select reset from tbl_user where (ip='{$ip}' or wallet='{$wallet}') and reset>{$now} order by reset desc"); if ($db->rownum()) { $timer = true; $smarty->assign('diff', $db->res['reset'] - $now); $smarty->assign('timer', true); }