You are here

function Braintree_TransactionTest::testRefundWithPartialAmount in Commerce Braintree 7

File

braintree_php/tests/integration/TransactionTest.php, line 1139

Class

Braintree_TransactionTest

Code

function testRefundWithPartialAmount() {
  $transaction = $this
    ->createTransactionToRefund();
  $result = Braintree_Transaction::refund($transaction->id, '50.00');
  $this
    ->assertTrue($result->success);
  $this
    ->assertEquals(Braintree_Transaction::CREDIT, $result->transaction->type);
  $this
    ->assertEquals("50.00", $result->transaction->amount);
}