make 402 payments work again

This commit is contained in:
Florian Dold 2016-09-26 14:52:33 +02:00
parent d76810e4af
commit 1426c886ae
7 changed files with 11 additions and 2 deletions

4
.gitmodules vendored Normal file
View File

@ -0,0 +1,4 @@
[submodule "web-common"]
path = web-common
url = git://taler.net/web-common
branch = master

View File

@ -32,7 +32,6 @@
namespace TalerNotify {
const PROTOCOL_VERSION = 1;
let taler: any;
if (!taler) {
console.error("Taler wallet lib not included, HTTP 402 payments not" +
" supported");
@ -76,7 +75,7 @@ namespace TalerNotify {
} else if (resp && resp.type === "execute") {
console.log("it's execute");
document.documentElement.style.visibility = "hidden";
taler.internalExecuteContract(resp.contractHash,
taler.internalExecutePayment(resp.contractHash,
resp.payUrl,
resp.offerUrl);
}

1
lib/taler-wallet-lib.ts Symbolic link
View File

@ -0,0 +1 @@
../web-common/taler-wallet-lib.ts

View File

@ -300,6 +300,7 @@ export function wxMain() {
if (uri.protocol() == "http" || uri.protocol() == "https") {
console.log("injecting into existing tab", tab.id);
chrome.tabs.executeScript(tab.id, {file: "lib/vendor/URI.js"});
chrome.tabs.executeScript(tab.id, {file: "lib/taler-wallet-lib.js"});
chrome.tabs.executeScript(tab.id, {file: "content_scripts/notify.js"});
}
}

View File

@ -31,6 +31,7 @@
"matches": ["*://*/*"],
"js": [
"lib/vendor/URI.js",
"lib/taler-wallet-lib.js",
"content_scripts/notify.js"
],
"run_at": "document_start"

View File

@ -15,7 +15,9 @@
"lib/i18n.ts",
"lib/refs.ts",
"lib/shopApi.ts",
"lib/taler-wallet-lib.ts",
"lib/wallet/checkable.ts",
"lib/wallet/chromeBadge.ts",
"lib/wallet/cryptoApi.ts",
"lib/wallet/cryptoLib.ts",
"lib/wallet/cryptoWorker.ts",

1
web-common Submodule

@ -0,0 +1 @@
Subproject commit aa18912d33902467450f207f9dcc392037a3fe79