generateInvalidUsBankAccountNonce() public static method

Exemplo n.º 1
0
 public function testFind_throwsIfCannotBeFound()
 {
     $this->setExpectedException('Braintree\\Exception\\NotFound');
     Braintree\UsBankAccount::find(Test\Helper::generateInvalidUsBankAccountNonce());
 }
Exemplo n.º 2
0
 public function testSaleWithInvalidUsBankAccountNonce()
 {
     $result = Braintree\Transaction::sale(['amount' => '100.00', 'merchantAccountId' => 'us_bank_merchant_account', 'paymentMethodNonce' => Test\Helper::generateInvalidUsBankAccountNonce(), 'options' => ['submitForSettlement' => true, 'storeInVault' => true]]);
     $this->assertFalse($result->success);
     $baseErrors = $result->errors->forKey('transaction')->onAttribute('paymentMethodNonce');
     $this->assertEquals(Braintree\Error\Codes::TRANSACTION_PAYMENT_METHOD_NONCE_UNKNOWN, $baseErrors[0]->code);
 }