You are here

public static function Braintree_CreditCard::update in Commerce Braintree 7

updates the creditcard record

if calling this method in static context, $token is the 2nd attribute. $token is not sent in object context.

@access public

Parameters

array $attributes:

string $token (optional):

Return value

object Braintree_Result_Successful or Braintree_Result_Error

5 calls to Braintree_CreditCard::update()
Braintree_CreditCard::updateNoValidate in braintree_php/lib/Braintree/CreditCard.php
update a creditcard record, assuming validations will pass
Braintree_CreditCardTest::testUpdate in braintree_php/tests/integration/CreditCardTest.php
Braintree_CreditCardTest::testUpdate_canChangeToken in braintree_php/tests/integration/CreditCardTest.php
Braintree_CreditCardTest::testUpdate_withCardVerification in braintree_php/tests/integration/CreditCardTest.php
Braintree_CreditCardTest::testUpdate_withCardVerificationAndSpecificMerchantAccount in braintree_php/tests/integration/CreditCardTest.php

File

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

Class

Braintree_CreditCard
Creates and manages Braintree CreditCards

Code

public static function update($token, $attributes) {
  Braintree_Util::verifyKeys(self::updateSignature(), $attributes);
  self::_validateId($token);
  return self::_doUpdate('put', '/payment_methods/' . $token, array(
    'creditCard' => $attributes,
  ));
}