You are here

public static function Braintree_CreditCard::credit in Commerce Braintree 7

create a credit on the card for the passed transaction

@access public

Parameters

array $attribs:

Return value

object Braintree_Result_Successful or Braintree_Result_Error

2 calls to Braintree_CreditCard::credit()
Braintree_CreditCard::creditNoValidate in braintree_php/lib/Braintree/CreditCard.php
create a credit on this card, assuming validations will pass
Braintree_CreditCardTest::testCredit_createsACreditUsingGivenToken in braintree_php/tests/integration/CreditCardTest.php

File

braintree_php/lib/Braintree/CreditCard.php, line 216

Class

Braintree_CreditCard
Creates and manages Braintree CreditCards

Code

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