Commit 7db8fcc5 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Allow sites to custom the return page where the user will be driven into after payment

parent 46167afe
Pipeline #9606 failed with stage
in 0 seconds
......@@ -22,13 +22,19 @@
return {};
})
.declareMethod("render", function (options) {
var gadget = this;
var gadget = this,
return_page = options.return_page;
if (return_page === undefined) {
return_page = "slap_invoice_list";
}
return new RSVP.Queue()
.push(function () {
return RSVP.all([
gadget.getElement(),
gadget.getUrlFor({command: 'change',
options: {jio_key: "/", page: "slap_invoice_list", "result": ""}})
options: {jio_key: "/", page: return_page, "result": ""}})
]);
})
.push(function (result) {
......@@ -65,7 +71,6 @@
} else {
throw new Error("Unknown action to take: " + options.result);
}
console.log(options);
element.innerHTML = message_template({
message_to_acknowledge: message,
advice: advice,
......
......@@ -99,7 +99,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget SlapOS Site invoice State</string> </value>
<value> <string>Gadget SlapOS Payment Result JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
......@@ -231,7 +231,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.64933.61168.51421</string> </value>
<value> <string>984.11864.24475.17493</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -249,7 +249,7 @@
</tuple>
<state>
<tuple>
<float>1516648704.86</float>
<float>1590639279.1</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment