Fix using HTTP secure and insecure protocols in local env and in sandbox.

1. For sandbox do not use SSL certificate verification.
2. For sandbox use HTTPS when submitting form. Otherwise use HTTP.