当前位置: 首页>>代码示例>>PHP>>正文


PHP jsonRPCClient::getaccount方法代码示例

本文整理汇总了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;
}
开发者ID:bitcoinbrisbane,项目名称:EzBitcoin-Api-Wallet,代码行数:8,代码来源:funct_jsonrpc.php

示例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();
     }
 }
开发者ID:Christian1998,项目名称:php_btc_exchange,代码行数:50,代码来源:moneyController.php


注:本文中的jsonRPCClient::getaccount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。