Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

De-dupe logic.

  • Loading branch information...
commit b20e3182530157621729d06fe58e83cfe3840df6 1 parent 3ac94b2
@gabebw gabebw authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/fake_braintree/credit_card.rb
View
6 lib/fake_braintree/credit_card.rb
@@ -31,12 +31,10 @@ def response_for_updated_card(credit_card)
end
def credit_card_exists_in_registry?
- token = credit_card['token']
FakeBraintree.registry.credit_cards.key?(token)
end
def credit_card_from_registry
- token = credit_card['token']
FakeBraintree.registry.credit_cards[token]
end
@@ -71,5 +69,9 @@ def set_expiration_month_and_year
@credit_card["expiration_year"] = expiration_year
end
end
+
+ def token
+ credit_card['token']
+ end
end
end

0 comments on commit b20e318

Please sign in to comment.
Something went wrong with that request. Please try again.