You are here

public static function Braintree_Transaction::find in Commerce Braintree 7

@access public

5 calls to Braintree_Transaction::find()
Braintree_TransactionAdvancedSearchTest::test_rangeNode_settledAt in braintree_php/tests/integration/TransactionAdvancedSearchTest.php
Braintree_TransactionTest::testErrorsWhenFindWithBlankString in braintree_php/tests/unit/TransactionTest.php
Braintree_TransactionTest::testErrorsWhenFindWithWhitespaceString in braintree_php/tests/unit/TransactionTest.php
Braintree_TransactionTest::testFind in braintree_php/tests/integration/TransactionTest.php
Braintree_TransactionTest::testMultipleRefundsWithPartialAmounts in braintree_php/tests/integration/TransactionTest.php

File

braintree_php/lib/Braintree/Transaction.php, line 342

Class

Braintree_Transaction
Creates and manages transactions

Code

public static function find($id) {
  self::_validateId($id);
  try {
    $response = Braintree_Http::get('/transactions/' . $id);
    return self::factory($response['transaction']);
  } catch (Braintree_Exception_NotFound $e) {
    throw new Braintree_Exception_NotFound('transaction with id ' . $id . ' not found');
  }
}