function Braintree_TransactionTest::testCreateFromTransparentRedirectWithInvalidParams in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ TransactionTest.php, line 1032
Class
Code
function testCreateFromTransparentRedirectWithInvalidParams() {
Braintree_TestHelper::suppressDeprecationWarnings();
$queryString = $this
->createTransactionViaTr(array(
'transaction' => array(
'bad_key' => 'bad_value',
'customer' => array(
'first_name' => 'First',
),
'credit_card' => array(
'number' => '5105105105105100',
'expiration_date' => '05/12',
),
),
), array(
'transaction' => array(
'type' => Braintree_Transaction::SALE,
'amount' => '100.00',
),
));
try {
$result = Braintree_Transaction::createFromTransparentRedirect($queryString);
$this
->fail();
} catch (Braintree_Exception_Authorization $e) {
$this
->assertEquals("Invalid params: transaction[bad_key]", $e
->getMessage());
}
}