From 281ec9c7856fe96934e0255fcb83aa4bb0ed64ff Mon Sep 17 00:00:00 2001 From: Jens Goldhammer Date: Sun, 15 Oct 2017 21:50:12 +0200 Subject: [PATCH] fix(payback): fixes adaptions of paypack --- payback.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/payback.lua b/payback.lua index 7ec5ed4..035e6fe 100644 --- a/payback.lua +++ b/payback.lua @@ -44,7 +44,7 @@ WebBanking { version = 1.1, country = "de", - url = "https://www.payback.de/pb/authenticate/id/713416/#loginSecureTab", + url = "https://www.payback.de/login", services = {"Payback-Punkte"}, description = string.format(MM.localizeText("Get points of %s"), "Payback account") } @@ -149,7 +149,7 @@ function InitializeSession(protocol, bankCode, username, customer, password) loginPage:xpath("//*[@id='aliasInputSecure']"):attr("value", username) loginPage:xpath("//*[@id='passwordInput']"):attr("value", password) - MM.printStatus("parameters filled in "); + MM.printStatus("parameters filled in..."); -- Submit login form. local request = connection:request(loginPage:xpath("//input[@id='loginSubmitButtonSecure']"):click()) @@ -170,6 +170,8 @@ function InitializeSession(protocol, bankCode, username, customer, password) -- hard coded point url ... overview_html = HTML(connection:get("https://www.payback.de/pb/punktekonto/id/13598/")) + MM.printStatus("overview page " ..overview_html) + print("Session initialization completed successfully.") MM.printStatus("Login successfull...") return nil @@ -202,10 +204,14 @@ function RefreshAccount(account, since) overview_html:xpath("//input[@id='date1']"):attr("value", os.date("%d.%m.%Y", since)) overview_html:xpath("//input[@id='date2']"):attr("value", os.date("%d.%m.%Y")) - MM.printStatus("Fill in date ranges") + MM.printStatus("Fill in date ranges" ) print("Submitting transaction search form for " .. account.accountNumber) - overview_html = HTML(connection:request(overview_html:xpath("//form[@id='pointRangeForm']"):submit())) + local form = overview_html:xpath("//form[@id='pointRangeForm']") + + MM.printStatus("Form for pointRangeForm: " .. form) + + overview_html = HTML(form):submit())) -- Get paypack points from text next to select box local balance = overview_html:xpath("//span[@id='serverPoints']"):text()