paypal: Simpler "real" transaction filtering

This commit is contained in:
Laurent Bachelier 2013-02-05 16:56:25 +01:00
commit 0705ce5b02

View file

@ -129,7 +129,7 @@ class DownloadHistoryPage(BasePage):
self.browser['from_a'] = str(today.month)
self.browser['from_b'] = str(today.day)
self.browser['custom_file_type'] = ['comma_allactivity']
self.browser['custom_file_type'] = ['comma_balaffecting']
self.browser['latest_completed_file_type'] = ['']
self.browser.submit()
@ -141,16 +141,10 @@ class SubmitPage(BasePage):
"""
def iter_transactions(self, account):
csv = self.document
for row in csv.drows:
# only "real" stuff, no cancelled payments etc.
if row['Status'] != 'Completed':
continue
for row in csv.rows:
# we filter accounts by currency
if account.get_currency(row['Currency']) != account.currency:
continue
# does not seem to be a real transaction; duplicates others
if row['Type'] == u'Authorization':
continue
trans = Transaction(row['Transaction ID'])