support payment in several times

This commit is contained in:
Romain Bignon 2012-11-10 12:37:12 +01:00
commit 33bbe6d451
2 changed files with 6 additions and 6 deletions

View file

@ -79,7 +79,7 @@ class BredBrowser(BaseBrowser):
return None
def iter_transactions(self, id):
def iter_transactions(self, id, is_coming=None):
numero_compte, numero_poste = id.split('.')
data = {'typeDemande': 'recherche',
'motRecherche': '',
@ -94,7 +94,7 @@ class BredBrowser(BaseBrowser):
self.location('https://www.bred.fr/Andromede/Ecriture', urllib.urlencode(data))
assert self.is_on_page(TransactionsPage)
return self.page.get_history()
return self.page.get_history(is_coming)
def get_history(self, account):
for tr in self.iter_transactions(account.id):
@ -105,5 +105,5 @@ class BredBrowser(BaseBrowser):
def get_card_operations(self, account):
for id in account._card_links:
for tr in self.iter_transactions(id):
for tr in self.iter_transactions(id, True):
yield tr