在 http 上启用 WooCommerce [英] Enable WooCommerce on http

查看:33
本文介绍了在 http 上启用 WooCommerce的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在工作推车应用程序.我安装了 WooCommerce 插件并在 http 服务器中生成了密钥.但它不返回任何产品数据.WooCommerce 是在 HTTP 中工作还是仅在 https 中工作?

Iam working cart apllication. I installed WooCommerce plugin and generated keys in http server. But it is not returning any products data. Is WooCommerce works in HTTP or it works only in https?

推荐答案

API 适用于 http 和 https 协议.对于 http,您必须对您的请求进行编码,而对于 https,因为它已经编码,您只需将密钥和秘密作为参数传递.如果您首先在 POSTMAN 中测试响应,则最好.我附上了在 HTTP 上成功获取响应的屏幕截图.

The API works on both http and https protocols. For http you'll have to encode your requests and for https since its already encoded, you just pass the key and secret as parameters. Its best if you first test the response in POSTMAN. I'm attaching screenshot of a successful get response on HTTP.

如您所见,您需要一个签名方法、时间戳和随机数.每种服务器端语言都有不同的实现.因此,请阅读文档并尝试示例.

As you see, you need a Signature method, timestamp and nonce. Every server side language will have different implementations. So read the documentation and try out the examples.

https 更简单,我强烈建议在投入生产之前安装 SSL 证书.

Its a lot simpler for https, and I highly recommend installing an SSL certificate before going into production.

这篇关于在 http 上启用 WooCommerce的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆