You are here

function Braintree_TransactionTest::testCreditNoValidate in Commerce Braintree 7

File

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

Class

Braintree_TransactionTest

Code

function testCreditNoValidate() {
  $transaction = Braintree_Transaction::creditNoValidate(array(
    'amount' => '100.00',
    'creditCard' => array(
      'number' => '5105105105105100',
      'expirationDate' => '05/12',
    ),
  ));
  $this
    ->assertEquals(Braintree_Transaction::CREDIT, $transaction->type);
  $this
    ->assertEquals(Braintree_Transaction::SUBMITTED_FOR_SETTLEMENT, $transaction->status);
  $this
    ->assertEquals('100.00', $transaction->amount);
  $this
    ->assertEquals('510510', $transaction->creditCardDetails->bin);
  $this
    ->assertEquals('5100', $transaction->creditCardDetails->last4);
}