function Braintree_TransactionTest::testSale_withProcessorDecline in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ TransactionTest.php, line 451
Class
Code
function testSale_withProcessorDecline() {
$result = Braintree_Transaction::sale(array(
'amount' => Braintree_Test_TransactionAmounts::$decline,
'creditCard' => array(
'number' => '5105105105105100',
'expirationDate' => '05/12',
),
));
$this
->assertFalse($result->success);
$this
->assertEquals(Braintree_Transaction::PROCESSOR_DECLINED, $result->transaction->status);
$this
->assertEquals(2000, $result->transaction->processorResponseCode);
$this
->assertEquals("Do Not Honor", $result->transaction->processorResponseText);
}