From 0705ce5b02ea2ec303d2a4207600859b56d0d8dc Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Tue, 5 Feb 2013 16:56:25 +0100 Subject: [PATCH] paypal: Simpler "real" transaction filtering --- modules/paypal/pages.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/modules/paypal/pages.py b/modules/paypal/pages.py index 27ced3fb..fface453 100644 --- a/modules/paypal/pages.py +++ b/modules/paypal/pages.py @@ -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'])