I'm trying to test out Google's PaymentRequest api on a local website running in my android emulator. However, when I do
var paymentRequest = window.PaymentRequest(//some object here//);
I get the following error
"Error: Failed to construct 'PaymentRequest': Must be in a secure context
Now, PaymentRequest DOES run on localhost and https, but running it from a port on an android emulator, where the uri is 10.2.2.01:8000/myUrlHere
will fail becuase that's not localhost. Any ideas as to how to get around this?
PaymentRequest must be used on secure context, which is one of:
http:// 10.2.2.01:8000 is not a secure context, so you can't use PaymentRequest there. Try one of the following: