You are here

public static function Braintree_Transaction::refund in Commerce Braintree 7

3 calls to Braintree_Transaction::refund()
Braintree_TransactionTest::testRefund in braintree_php/tests/integration/TransactionTest.php
Braintree_TransactionTest::testRefundWithPartialAmount in braintree_php/tests/integration/TransactionTest.php
Braintree_TransactionTest::testRefundWithUnsuccessfulPartialAmount in braintree_php/tests/integration/TransactionTest.php

File

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

Class

Braintree_Transaction
Creates and manages transactions

Code

public static function refund($transactionId, $amount = null) {
  $params = array(
    'transaction' => array(
      'amount' => $amount,
    ),
  );
  $response = Braintree_Http::post('/transactions/' . $transactionId . '/refund', $params);
  return self::_verifyGatewayResponse($response);
}