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


PHP Transaction::getAmount方法代码示例

本文整理汇总了PHP中Transaction::getAmount方法的典型用法代码示例。如果您正苦于以下问题:PHP Transaction::getAmount方法的具体用法?PHP Transaction::getAmount怎么用?PHP Transaction::getAmount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Transaction的用法示例。


在下文中一共展示了Transaction::getAmount方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionEarned

 /**
  * Get All notifications of a user.
  *
  * @author Kuldeep Dangi <kuldeep.dangi@yiifrmae.com>
  */
 public function actionEarned($userId)
 {
     $model = new Transaction();
     $this->result['data'] = $model->getAmount($userId, array(5));
     $this->result['success'] = true;
     $this->sendResponse($this->result);
 }
开发者ID:kuldeepro,项目名称:notesgen,代码行数:12,代码来源:NcashController.php

示例2: createTransaction

 protected function createTransaction(\SimpleXMLElement $node, Transaction $tx, Account $account)
 {
     $nodes = ['accountFrom' => $account->getAccountNumber(), 'currency' => $tx->getCurrency(), 'amount' => number_format($tx->getAmount(), 2), 'accountTo' => $tx->getAccountNumber(), 'bankCode' => $tx->getBankCode(), 'ks' => $tx->getConstantSymbol(), 'vs' => $tx->getVariableSymbol(), 'ss' => $tx->getSpecificSymbol(), 'date' => $tx->getDate()->format('Y-m-d'), 'messageForRecipient' => $tx->getUserMessage(), 'comment' => $tx->getComment(), 'paymentType' => $tx->getSpecification()];
     foreach ($nodes as $el => $value) {
         if (!empty($value)) {
             $node->addChild($el, $value);
         }
     }
 }
开发者ID:perlur,项目名称:php-fio-api,代码行数:9,代码来源:DomesticPaymentBuilder.php

示例3: createTransaction

 protected function createTransaction(\SimpleXMLElement $node, Transaction $tx, Account $account)
 {
     $nodes = ['accountFrom' => $account->getAccountNumber(), 'currency' => $tx->getCurrency(), 'amount' => number_format($tx->getAmount(), 2), 'accountTo' => $tx->getAccountNumber(), 'ks' => $tx->getConstantSymbol(), 'vs' => $tx->getVariableSymbol(), 'ss' => $tx->getSpecificSymbol(), 'bic' => $tx->getBankCode(), 'date' => $tx->getDate()->format('Y-m-d'), 'comment' => $tx->getComment(), 'benefName' => $tx->getBenefName(), 'benefStreet' => $tx->getBenefStreet(), 'benefCity' => $tx->getBenefCity(), 'benefCountry' => $tx->getBenefCountry(), 'remittanceInfo1' => $tx->getRemittanceInfo1(), 'remittanceInfo2' => $tx->getRemittanceInfo2(), 'remittanceInfo3' => $tx->getRemittanceInfo3(), 'paymentType' => $tx->getSpecification()];
     foreach ($nodes as $el => $value) {
         if (!empty($value)) {
             $node->addChild($el, $value);
         }
     }
 }
开发者ID:perlur,项目名称:php-fio-api,代码行数:9,代码来源:EuroPaymentBuilder.php

示例4: forTransaction

 public static function forTransaction(Transaction $transaction, $url_success = '')
 {
     $u_id = $transaction->getIdReceiver();
     $u = UserTable::getInstance()->findOneById($u_id);
     switch ($u->getUtype()) {
         case 'puser':
             $onpay_login = SettingTable::getInstance()->findOneByName('pOnpayLogin')->getValue();
             $private_code = SettingTable::getInstance()->findOneByName('pApiCode')->getValue();
             break;
         case 'uuser':
             $onpay_login = SettingTable::getInstance()->findOneByName('uOnpayLogin')->getValue();
             $private_code = SettingTable::getInstance()->findOneByName('uApiCode')->getValue();
             break;
         default:
             throw new sfException('Неизвестный тип пользователя в транзакции при инициализации платежа OnPay');
             break;
     }
     return new OnPay($onpay_login, $private_code, $transaction->getId(), $transaction->getAmount(), $url_success);
 }
开发者ID:rollmax,项目名称:read2read,代码行数:19,代码来源:OnPay.class.php

示例5: addFundsFin

 public static function addFundsFin(Transaction $transaction)
 {
     if ($transaction->getIsPaid()) {
         // транзакция уже была обработана
         return false;
     } else {
         $transaction->addFundsFin();
     }
     // set new balance
     $user = UserTable::getInstance()->findOneById($transaction->getIdReceiver());
     $user->setBalans($transaction->getReceiverBalanceAfter());
     $user->save();
     $amount = $transaction->getAmount();
     // write to BalanceUser instance
     if (!($userBalance = BalanceUserTable::getByUserIdAndPeriodId($user->getId()))) {
         $userBalance = new BalanceUser();
         $userBalance->setPeriod(Period::getCurrentPeriod());
         $userBalance->setUser($user);
     }
     $userBalance->setAddFunds($userBalance->getAddFunds() + $amount);
     $userBalance->save();
     if (!($systemBalance = BalanceSystem::getCurrentBalanceInstance())) {
         sfContext::getInstance()->getLogger()->info('aS4W Error: getCurrentBalanceInstance return false');
         return false;
     }
     if ($user->getUSerTypePrefix() == 'u') {
         $systemBalance->setDepositUser($systemBalance->getDepositUser() + $amount);
     } else {
         switch ($user->getTariff()) {
             case 'standart':
                 $systemBalance->setDepositStandart($systemBalance->getDepositStandart() + $amount);
                 break;
             case 'super':
                 $systemBalance->setDepositSuper($systemBalance->getDepositSuper() + $amount);
                 break;
             case 'expert':
                 $systemBalance->setDepositExpert($systemBalance->getDepositExpert() + $amount);
                 break;
         }
     }
     $systemBalance->save();
     // If user blocked try UnBlock
     if ($user->is_blocked) {
         $user->tryUnBlockUser();
     }
     return true;
 }
开发者ID:rollmax,项目名称:read2read,代码行数:47,代码来源:User.class.php

示例6: safeInsertDate

 /**
  * Helper function for adding transactions to the daily balance.
  * 
  * @param Transaction $transaction
  * @param boolean $sort Flag for disabling sort on insert. Used for bulk loading.
  */
 private function safeInsertDate(Transaction $transaction, $sort = false)
 {
     $date = $transaction->getDate();
     if (!array_key_exists($date, $this->mDailyBalances)) {
         $this->mDailyBalances[$date] = 0.0;
     }
     $this->mDailyBalances[$date] += $transaction->getAmount();
     if ($sort) {
         uksort($this->mDailyBalances, array($this, "dateCompare"));
     }
 }
开发者ID:brentnem,项目名称:benchapplication,代码行数:17,代码来源:transactionrecord.php


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