HTTPS request via AJAX from HTTP page

2019-01-09 00:38发布

Would there be any problems calling an HTTPS page (e.g. a credit card authorisation service i.e. WorldPay) from a standard HTTP page via AJAX?

I can't imagine why there would be a problem, the response would be an HTML page which I could then embed in a result pane or such like?

标签: ajax https
2条回答
女痞
2楼-- · 2019-01-09 01:11

Yes this would be a Cross domain posting and would be blocked by the browser.

闹够了就滚
3楼-- · 2019-01-09 01:21

Anthony is right, but what you could do is create a local page the AJAX calls and that communicates with the HTTPS service via cURL or something else and returns. That way everything is done locally according to Java script.

登录 后发表回答