paypal: Proper multi-currency support

An account per currency.
And fix xpath (missing ".").
This commit is contained in:
Laurent Bachelier 2013-02-04 18:11:06 +01:00
commit 395d7e5e5d
3 changed files with 45 additions and 20 deletions

View file

@ -56,12 +56,12 @@ class Paypal(BaseBrowser):
raise BrowserIncorrectPassword()
def get_accounts(self):
yield self.get_account(u"1")
if not self.is_on_page(AccountPage):
self.location('/en/cgi-bin/webscr?cmd=_account&nav=0.0')
return self.page.get_accounts()
def get_account(self, _id):
if _id != u"1":
return None
if not self.is_on_page(AccountPage):
self.location('/en/cgi-bin/webscr?cmd=_account&nav=0.0')