本文整理汇总了PHP中jsonRPCClient::getaccount方法的典型用法代码示例。如果您正苦于以下问题:PHP jsonRPCClient::getaccount方法的具体用法?PHP jsonRPCClient::getaccount怎么用?PHP jsonRPCClient::getaccount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jsonRPCClient
的用法示例。
在下文中一共展示了jsonRPCClient::getaccount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: funct_Billing_JSONRPC_GetLabel
function funct_Billing_JSONRPC_GetLabel($strWalletAddress)
{
//works
//give address and get back label
$mybtc = new jsonRPCClient(JSONRPC_CONNECTIONSTRING);
$strReturnInfo = $mybtc->getaccount($strWalletAddress);
return $strReturnInfo;
}
示例2: LTC_processing
public static function LTC_processing()
{
$transaction_hash = Core::validate($_POST['transaction_hash']);
$address = Core::validate($_POST['address']);
$value_in_ltc = Core::validate($_POST['amount']);
$confirmations = Core::validate($_POST['confirmations']);
if ($_GET['test'] == true) {
exit;
}
$at_ltc = new AtLtc();
$exist = $at_ltc->findBy(array('address' => $address, 'type' => 0, 'done' => 0));
if ($exist == false) {
return;
}
if ($confirmations >= LTC_CONFIRMATIONS) {
$currency = new Currency();
$currency->findBy(array('Name' => 'LTC'));
$limits = self::transactionLimits($currency->getId(), 'LTC', 0);
if ($value_in_ltc < $limits['min'] || $limits['max'] != null && $value_in_ltc > $limits['max']) {
return;
}
$litecoin = new jsonRPCClient('http://' . LTC_RPC_USER . ':' . LTC_RPC_PASSWORD . '@' . LTC_RPC_HOST . ":" . LTC_RPC_PORT . '/');
try {
$account = $litecoin->getaccount($address);
} catch (Exception $e) {
return;
}
$wallets = WalletsLtc::findBy(array('account' => $account));
if (empty($wallets)) {
return;
}
$feeVolume = $value_in_ltc * $limits['fee'];
$feeVolume = Core::round_up($feeVolume, 8);
$purses = Purse::findBy(array('UID' => $at_ltc->getUID(), 'CurId' => $currency->getId()));
$purse = new Purse();
$purse->findById($purses[0]['id']);
$purse->addValue($value_in_ltc - $feeVolume);
$purse->save();
$wallet = new WalletsLtc();
$wallet->findById($wallets[0]['id']);
$profit = $feeVolume * $wallet->getShare();
$wallet->setProfit($wallet->getProfit() + $profit);
$wallet->save();
$at_ltc->setDone(1);
$at_ltc->setTransactionHash($transaction_hash);
$at_ltc->setValue($value_in_ltc);
$at_ltc->setTimestamp(Core::timestamp_gmp());
$at_ltc->save();
}
}