You are here

public function Braintree_CreditCard::isEqual in Commerce Braintree 7

returns false if comparing object is not a Braintree_CreditCard, or is a Braintree_CreditCard with a different id

Parameters

object $otherCreditCard customer to compare against:

Return value

boolean

File

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

Class

Braintree_CreditCard
Creates and manages Braintree CreditCards

Code

public function isEqual($otherCreditCard) {
  return !$otherCreditCard instanceof Braintree_CreditCard ? false : $this->token === $otherCreditCard->token;
}