make 402 payments work again
This commit is contained in:
parent
d76810e4af
commit
1426c886ae
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[submodule "web-common"]
|
||||||
|
path = web-common
|
||||||
|
url = git://taler.net/web-common
|
||||||
|
branch = master
|
@ -32,7 +32,6 @@
|
|||||||
namespace TalerNotify {
|
namespace TalerNotify {
|
||||||
const PROTOCOL_VERSION = 1;
|
const PROTOCOL_VERSION = 1;
|
||||||
|
|
||||||
let taler: any;
|
|
||||||
if (!taler) {
|
if (!taler) {
|
||||||
console.error("Taler wallet lib not included, HTTP 402 payments not" +
|
console.error("Taler wallet lib not included, HTTP 402 payments not" +
|
||||||
" supported");
|
" supported");
|
||||||
@ -76,7 +75,7 @@ namespace TalerNotify {
|
|||||||
} else if (resp && resp.type === "execute") {
|
} else if (resp && resp.type === "execute") {
|
||||||
console.log("it's execute");
|
console.log("it's execute");
|
||||||
document.documentElement.style.visibility = "hidden";
|
document.documentElement.style.visibility = "hidden";
|
||||||
taler.internalExecuteContract(resp.contractHash,
|
taler.internalExecutePayment(resp.contractHash,
|
||||||
resp.payUrl,
|
resp.payUrl,
|
||||||
resp.offerUrl);
|
resp.offerUrl);
|
||||||
}
|
}
|
||||||
|
1
lib/taler-wallet-lib.ts
Symbolic link
1
lib/taler-wallet-lib.ts
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../web-common/taler-wallet-lib.ts
|
@ -300,6 +300,7 @@ export function wxMain() {
|
|||||||
if (uri.protocol() == "http" || uri.protocol() == "https") {
|
if (uri.protocol() == "http" || uri.protocol() == "https") {
|
||||||
console.log("injecting into existing tab", tab.id);
|
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/vendor/URI.js"});
|
||||||
|
chrome.tabs.executeScript(tab.id, {file: "lib/taler-wallet-lib.js"});
|
||||||
chrome.tabs.executeScript(tab.id, {file: "content_scripts/notify.js"});
|
chrome.tabs.executeScript(tab.id, {file: "content_scripts/notify.js"});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
"matches": ["*://*/*"],
|
"matches": ["*://*/*"],
|
||||||
"js": [
|
"js": [
|
||||||
"lib/vendor/URI.js",
|
"lib/vendor/URI.js",
|
||||||
|
"lib/taler-wallet-lib.js",
|
||||||
"content_scripts/notify.js"
|
"content_scripts/notify.js"
|
||||||
],
|
],
|
||||||
"run_at": "document_start"
|
"run_at": "document_start"
|
||||||
|
@ -15,7 +15,9 @@
|
|||||||
"lib/i18n.ts",
|
"lib/i18n.ts",
|
||||||
"lib/refs.ts",
|
"lib/refs.ts",
|
||||||
"lib/shopApi.ts",
|
"lib/shopApi.ts",
|
||||||
|
"lib/taler-wallet-lib.ts",
|
||||||
"lib/wallet/checkable.ts",
|
"lib/wallet/checkable.ts",
|
||||||
|
"lib/wallet/chromeBadge.ts",
|
||||||
"lib/wallet/cryptoApi.ts",
|
"lib/wallet/cryptoApi.ts",
|
||||||
"lib/wallet/cryptoLib.ts",
|
"lib/wallet/cryptoLib.ts",
|
||||||
"lib/wallet/cryptoWorker.ts",
|
"lib/wallet/cryptoWorker.ts",
|
||||||
|
1
web-common
Submodule
1
web-common
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit aa18912d33902467450f207f9dcc392037a3fe79
|
Loading…
Reference in New Issue
Block a user