Don't charge google checkout orders with bad amounts.

This commit is contained in:
bsimpson63
2013-05-05 21:19:18 -04:00
parent 7b35405280
commit 00e86bcb8b

View File

@@ -422,6 +422,8 @@ class IpnController(RedditController):
pennies = int(float(trans.find("order-total"
).contents[0])*100)
months, days = months_and_days_from_pennies(pennies)
if not months:
raise ValueError("Bad pennies for %s" % short_sn)
charged = trans.find("charge-amount-notification")
if not charged:
_google_charge_and_ship(short_sn)