You are here

public static function Braintree_Customer::credit in Commerce Braintree 7

credit a customer for the passed transaction

@access public

Parameters

array $attribs:

Return value

object Braintree_Result_Successful or Braintree_Result_Error

2 calls to Braintree_Customer::credit()
Braintree_Customer::creditNoValidate in braintree_php/lib/Braintree/Customer.php
credit a customer, assuming validations will pass
Braintree_CustomerTest::testCredit_createsACreditUsingGivenCustomerId in braintree_php/tests/integration/CustomerTest.php

File

braintree_php/lib/Braintree/Customer.php, line 213

Class

Braintree_Customer
Creates and manages Customers

Code

public static function credit($customerId, $transactionAttribs) {
  self::_validateId($customerId);
  return Braintree_Transaction::credit(array_merge($transactionAttribs, array(
    'customerId' => $customerId,
  )));
}