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