diff options
-rw-r--r-- | examples/blog/essay_cc-form.html | 10 | ||||
-rw-r--r-- | examples/shop/checkout.php | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/examples/blog/essay_cc-form.html b/examples/blog/essay_cc-form.html index beadceaa..f85b4f13 100644 --- a/examples/blog/essay_cc-form.html +++ b/examples/blog/essay_cc-form.html @@ -26,9 +26,13 @@ </form> </section> <script type="application/javascript"> - function handle_contract(json_contract) { - var cEvent = new CustomEvent('taler-contract', - {detail: json_contract}); + function handle_contract(contract_wrapper) { + var cEvent = new CustomEvent("taler-confirm-contract", { + detail: { + contract_wrapper: contract_wrapper, + replace_navigation: true + } + }); document.dispatchEvent(cEvent); }; diff --git a/examples/shop/checkout.php b/examples/shop/checkout.php index 9ed3cef9..fb70c9c4 100644 --- a/examples/shop/checkout.php +++ b/examples/shop/checkout.php @@ -130,8 +130,12 @@ /* This function is called from "taler_pay" after we downloaded the JSON contract from the merchant. We now need to pass it to the extension. */ -function handle_contract(json_contract) { - var cEvent = new CustomEvent('taler-contract', { detail: json_contract }); +function handle_contract(contract_wrapper) { + var cEvent = new CustomEvent('taler-confirm-contract', { + detail: { + contract_wrapper: contract_wrapper + } + }); document.dispatchEvent(cEvent); }; |