You are here

function Braintree_TransactionTest::testRecurring in Commerce Braintree 7

File

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

Class

Braintree_TransactionTest

Code

function testRecurring() {
  $result = Braintree_Transaction::sale(array(
    'amount' => '100.00',
    'recurring' => true,
    'creditCard' => array(
      'cardholderName' => 'The Cardholder',
      'number' => '5105105105105100',
      'expirationDate' => '05/12',
    ),
  ));
  $this
    ->assertTrue($result->success);
  $transaction = $result->transaction;
  $this
    ->assertEquals(true, $transaction->recurring);
}