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


PHP Bank::getBankID方法代码示例

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


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

示例1: isValid

 /**
  * @param int $bank
  * @param int $account
  * @return bool
  * @throws ValidationTestAPIException
  * @throws NotInitializedTestAPIException
  * @throws BankNotFoundTestAPIException
  */
 protected function isValid(Bank $bank, $account)
 {
     $isValid = kto_check_blz($bank->getBankID(), $account);
     switch ($isValid) {
         case self::NOT_INITIALIZED:
             throw new NotInitializedTestAPIException("LUT not initialized");
         case self::BANK_NOT_FOUND:
             throw new BankNotFoundTestAPIException($bank->getBankID());
         case self::INVALID_NULL:
         case self::INVALID_KTO:
         case self::INVALID_FALSE:
             return false;
         default:
             if ($isValid < 0) {
                 throw new ValidationTestAPIException("unknown code {$isValid}");
             }
             return true;
     }
 }
开发者ID:bmdevel,项目名称:bav,代码行数:27,代码来源:KontocheckTestAPI.php

示例2: getESER9

 /**
  * @throws ValidatorESERException
  * @return string
  */
 protected function getESER9()
 {
     $bankID = $this->bank->getBankID();
     $account = ltrim($this->account, '0');
     if (strlen($account) != 9) {
         throw new ValidatorESERException();
     }
     if ($bankID[3] != 5) {
         throw new ValidatorESERException();
     }
     $blzPart0 = substr($bankID, -4, 2);
     $blzPart1 = substr($bankID, -1);
     $accountPart0 = $account[0];
     $t = $account[1];
     $p = $account[2];
     $accountTail = ltrim(substr($account, 3), '0');
     $eser = $blzPart0 . $t . $blzPart1 . $accountPart0 . $p . $accountTail;
     return $eser;
 }
开发者ID:bmdevel,项目名称:bav,代码行数:23,代码来源:Validator.php

示例3: __construct

 public function __construct(Bank $bank)
 {
     parent::__construct("bank {$bank->getBankID()} has no main agency.");
     $this->bank = $bank;
 }
开发者ID:bmdevel,项目名称:bav,代码行数:5,代码来源:NoMainAgencyException.php

示例4: getAgenciesForBank

 /**
  * @throws DataBackendException
  * @return Agency[]
  * @see DataBackend::getAgenciesForBank()
  */
 public function getAgenciesForBank(Bank $bank)
 {
     try {
         $stmt = $this->statementContainer->prepare("SELECT {$this->agencyAttributes} FROM {$this->prefix}agency a\n                    WHERE bank = :bankID AND id != :mainAgency");
         $agencies = array();
         $stmt->execute(array(":bankID" => $bank->getBankID(), ":mainAgency" => $bank->getMainAgency()->getID()));
         foreach ($stmt->fetchAll() as $agencyResult) {
             $agencies[] = $this->getAgencyObject($bank, $agencyResult);
         }
         $stmt->closeCursor();
         return $agencies;
     } catch (\PDOException $e) {
         $stmt->closeCursor();
         throw new DataBackendIOException($e->getMessage(), 0, $e);
     } catch (MissingAttributesDataBackendIOException $e) {
         $stmt->closeCursor();
         throw new \LogicException($e);
     }
 }
开发者ID:bmdevel,项目名称:bav,代码行数:24,代码来源:PDODataBackend.php

示例5: getErrorMessage

 /**
  * @param Bank $bank
  * @param String $account
  * @param array $results
  * @return String
  */
 private function getErrorMessage(Bank $bank, $account, array $results)
 {
     $resultTranslation = array(TestAPIResult::VALID => "valid", TestAPIResult::INVALID => "invalid", TestAPIResult::ERROR => "error");
     $message = "bank: {$bank->getBankID()}  method: {$bank->getValidationType()}  account: {$account}";
     foreach ($results as $result) {
         $message .= "  {$result->getTestAPI()->getName()}: " . $resultTranslation[$result->getResult()];
         if ($result instanceof TestAPIErrorResult) {
             $message .= " {$result->getMessage()}";
         }
     }
     return $message;
 }
开发者ID:bmdevel,项目名称:bav,代码行数:18,代码来源:CrossProjectTest.php

示例6: testNullIsInvalid

 /**
  * 0 - 0000000000 should always be invalid
  *
  * @param String $validatorType
  * @throws ClassFileIOException
  * @throws MissingClassException
  * @dataProvider provideBanks
  */
 public function testNullIsInvalid(Bank $bank)
 {
     for ($length = 0; $length <= 10; $length++) {
         $account = str_pad("0", $length, "0", STR_PAD_LEFT);
         $this->assertFalse($bank->isValid($account), "{$bank->getBankID()}/{$bank->getValidationType()} {$account} should be invalid.");
     }
 }
开发者ID:bmdevel,项目名称:bav,代码行数:15,代码来源:ValidatorTest.php

示例7: isValid

 /**
  * @param int $account
  * @return bool
  * @throws ValidationTestAPIException
  * @throws NotInitializedTestAPIException
  * @throws BankNotFoundTestAPIException
  */
 protected function isValid(Bank $bank, $account)
 {
     $fileParam = empty($this->bankdata) ? '' : "--file={$this->bankdata}";
     $cmd = "{$this->binary} {$fileParam} '{$bank->getBankID()}' '{$account}'";
     exec($cmd, $out, $result);
     switch ($result) {
         case self::VALID:
             return true;
         case self::INVALID:
             return false;
         case self::BANK_NOT_FOUND:
             throw new BankNotFoundTestAPIException("Bank not found: {$bank->getBankID()}");
         default:
             throw new ValidationTestAPIException("unknown code {$result}: " . implode("\n", $out));
     }
 }
开发者ID:bmdevel,项目名称:bav,代码行数:23,代码来源:KtoblzcheckTestAPI.php


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