function Braintree_TransactionTest::testRefundWithUnsuccessfulPartialAmount in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ TransactionTest.php, line 1170
Class
Code
function testRefundWithUnsuccessfulPartialAmount() {
$transaction = $this
->createTransactionToRefund();
$result = Braintree_Transaction::refund($transaction->id, '150.00');
$this
->assertFalse($result->success);
$errors = $result->errors
->forKey('transaction')
->onAttribute('amount');
$this
->assertEquals(Braintree_Error_Codes::TRANSACTION_REFUND_AMOUNT_IS_TOO_LARGE, $errors[0]->code);
}