Skip to content

Commit

Permalink
Adding note about test credit cards in PP Pro sandbox.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolever committed Aug 25, 2010
1 parent 28c618e commit c0a092f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion paypal/pro/creditcard.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def is_mod10(self):

def is_test(self):
"""Returns True if number is a test card number."""
# Note: test numbers cannot be used in the PP Pro sandbox.
# Instead, use the credit card number associated with a
# sandbox account (Test Accounts -> View Details).
return self.number in TEST_NUMBERS

def get_type(self):
Expand All @@ -63,4 +66,4 @@ def verify(self):
"""Returns the card type if valid else None."""
if self.is_number() and not self.is_test() and self.is_mod10():
return self.get_type()
return None
return None

0 comments on commit c0a092f

Please sign in to comment.