mobile/android/base/tests/roboextender/paymentsUI.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 <html>
michael@0 2 <head>
michael@0 3 <script type="text/javascript">
michael@0 4 function start() {
michael@0 5 if (!mozPaymentProvider)
michael@0 6 window.close();
michael@0 7
michael@0 8 // We don't have a way to mock these values yet. This check just makes sure the world
michael@0 9 // doesn't crash if we ask for them.
michael@0 10 var mcc = mozPaymentProvider.mcc;
michael@0 11 var mnc = mozPaymentProvider.mnc;
michael@0 12
michael@0 13 // We use the jwt passed in here to test calling paymentFailed/Success
michael@0 14 if (window.location.hash == "#pass")
michael@0 15 mozPaymentProvider.paymentSuccess("PAID CORRECTLY");
michael@0 16 else if (window.location.hash == "#fail")
michael@0 17 mozPaymentProvider.paymentFailed("FAILED CORRECTLY");
michael@0 18 else
michael@0 19 mozPaymentProvider.paymentFailed("invalid hash " + window.location.hash);
michael@0 20 }
michael@0 21
michael@0 22 document.addEventListener("DOMContentLoaded", start);
michael@0 23 </script>
michael@0 24 </head>
michael@0 25 </html>

mercurial