From cbcf901530aa2935c41959bb9ea478e7b3e09709 Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Thu, 14 Nov 2013 21:33:27 -0500 Subject: [PATCH] Implement fee cap for Mass Pay --- masspay.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/masspay.py b/masspay.py index 1a8c2a267c..21a993c6bc 100755 --- a/masspay.py +++ b/masspay.py @@ -59,8 +59,9 @@ def __init__(self, rec): self.net = self.gross def assess_fee(self): - fee = self.gross - round_(self.gross / D('1.02')) # 2% fee - self.fee += fee + fee = self.gross - round_(self.gross / D('1.02')) # 2% fee + fee = min(fee, D('20.00')) # capped at $20 + self.fee += fee # XXX or $1 for U.S. :/ self.net -= fee if self.net % 1 in (D('0.25'), D('0.75')):