Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Implement fee cap for Mass Pay
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Nov 15, 2013
1 parent 41df3f7 commit cbcf901
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions masspay.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')):

Expand Down

0 comments on commit cbcf901

Please sign in to comment.