コード例 #1
0
 private function _createAccounts()
 {
     /* create account for Customer 1 */
     $custId = $this->_mapCustomerMageIdByIndex[1];
     $req = new AccountGetRequest();
     $req->setData(AccountGetRequest::CUSTOMER_ID, $custId);
     $req->setData(AccountGetRequest::ASSET_TYPE_ID, $this->typeAssetId);
     $req->setData(AccountGetRequest::CREATE_NEW_ACCOUNT_IF_MISSED, true);
     $resp = $this->_callAccount->get($req);
     $this->assertTrue($resp->isSucceed());
     $this->acc1 = $resp->getData();
     /* create account for Customer 2 */
     $custId = $this->_mapCustomerMageIdByIndex[2];
     $req->setData(AccountGetRequest::CUSTOMER_ID, $custId);
     $resp = $this->_callAccount->get($req);
     $this->assertTrue($resp->isSucceed());
     $this->acc2 = $resp->getData();
     $accFirstId = $this->acc1[Account::ATTR_ID];
     $accSecondId = $this->acc2[Account::ATTR_ID];
     $this->_logger->debug("2 customer accounts are created (#{$accFirstId}, #{$accSecondId}).");
 }