Exemplo n.º 1
0
 public function testDeleteBankAccount()
 {
     $createBankAccount = PromisePay::BankAccount()->create($this->bankAccountData);
     $bankAccountId = $createBankAccount['id'];
     $deleteBankAccount = PromisePay::BankAccount()->delete($bankAccountId);
     $this->assertEquals($deleteBankAccount, 'Successfully redacted');
 }
 protected function createBankAccount()
 {
     $bankAccount = PromisePay::BankAccount()->create($this->bankAccountData);
     $this->assertEquals($this->bankAccountData['account_name'], $bankAccount['bank']['account_name']);
     $this->assertNotNull($bankAccount['created_at']);
     $this->assertNotNull($bankAccount['updated_at']);
     return $bankAccount;
 }
Exemplo n.º 3
0
 public function testListUserBankAccounts()
 {
     // First, create the user
     $createUser = PromisePay::User()->create($this->userData);
     // update bank account data with the id of just created user
     $this->bankAccountData['user_id'] = $createUser['id'];
     // create a Bank Account
     $createBankAccount = PromisePay::BankAccount()->create($this->bankAccountData);
     // Lookup Bank Accounts associated with the user
     $userBankAccounts = PromisePay::User()->getListOfBankAccounts($createUser['id']);
     $this->assertEquals($this->bankAccountData['bank_name'], $userBankAccounts['bank']['bank_name']);
 }
Exemplo n.º 4
0
 public function testValidateRoutingNumber()
 {
     $validateRoutingNumber = PromisePay::BankAccount()->validateRoutingNumber($this->bankAccountData['routing_number']);
     $this->assertTrue(is_array($validateRoutingNumber));
     $this->assertEquals($validateRoutingNumber['routing_number'], $this->bankAccountData['routing_number']);
 }