Skip to content

Commit 0657dba

Browse files
author
Greg Taylor
committed
Merge pull request gtaylor#13 from cbsmith/master
Adding support for refunds
2 parents 47bca94 + 770f775 commit 0657dba

File tree

5 files changed

+112
-81
lines changed

5 files changed

+112
-81
lines changed

paypal/countries.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
44
http://xml.coverpages.org/country3166.html
55
6-
A tuple of tuples of country codes and their full names. There are a few helper
7-
functions provided if you'd rather not use the dict directly. Examples provided
6+
A tuple of tuples of country codes and their full names. There are a few helper
7+
functions provided if you'd rather not use the dict directly. Examples provided
88
in the test_countries.py unit tests.
99
"""
1010

@@ -254,37 +254,37 @@ def is_valid_country_abbrev(abbrev, case_sensitive=False):
254254
"""
255255
Given a country code abbreviation, check to see if it matches the
256256
country table.
257-
257+
258258
abbrev: (str) Country code to evaluate.
259259
case_sensitive: (bool) When True, enforce case sensitivity.
260-
260+
261261
Returns True if valid, False if not.
262262
"""
263263
if case_sensitive:
264264
country_code = abbrev
265265
else:
266266
country_code = abbrev.upper()
267-
267+
268268
for code, full_name in COUNTRY_TUPLES:
269269
if country_code == code:
270270
return True
271-
271+
272272
return False
273273

274274
def get_name_from_abbrev(abbrev, case_sensitive=False):
275275
"""
276276
Given a country code abbreviation, get the full name from the table.
277-
277+
278278
abbrev: (str) Country code to retrieve the full name of.
279279
case_sensitive: (bool) When True, enforce case sensitivity.
280280
"""
281281
if case_sensitive:
282282
country_code = abbrev
283283
else:
284284
country_code = abbrev.upper()
285-
285+
286286
for code, full_name in COUNTRY_TUPLES:
287287
if country_code == code:
288288
return full_name
289-
289+
290290
raise KeyError('No country with that country code.')

paypal/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class PayPalConfigError(PayPalError):
3131
class PayPalAPIResponseError(PayPalError):
3232
"""
3333
Raised when there is an error coming back with a PayPal NVP API response.
34-
34+
3535
Pipe the error message from the API to the exception, along with
3636
the error code.
3737
"""

0 commit comments

Comments
 (0)