paypal: Start support for multiple currencies

For now, ignore everything that is not the primary, and do not use the
converted total.

This is based on http://i.imgur.com/TNcLbPB.jpg
as I have 0 in all currencies for now.
This commit is contained in:
Laurent Bachelier 2013-02-04 16:31:27 +01:00
commit 6e7599d4e3
3 changed files with 30 additions and 8 deletions

View file

@ -55,6 +55,9 @@ class Paypal(BaseBrowser):
if self.is_on_page(LoginPage):
raise BrowserIncorrectPassword()
def get_accounts(self):
yield self.get_account(u"1")
def get_account(self, _id):
if _id != u"1":
return None
@ -62,7 +65,7 @@ class Paypal(BaseBrowser):
if not self.is_on_page(AccountPage):
self.location('/en/cgi-bin/webscr?cmd=_account&nav=0.0')
return self.page.get_account()
return self.page.get_account(_id)
def get_history(self, account):
raise NotImplementedError()