WooCommerce + Ionic: Unable to signup and checkout

2020-02-02 03:46发布

I am working on a project that integrates WooCommerce with Ionic 3 and I am having problems with the signup and checkout functionality. I am able to read products and login from my WooCommerce site, but every time I do a post request, I am getting these errors:

{"errors":[{"code":"woocommerce_api_authentication_error","message":"Invalid signature - provided signature does not match."}]}

How can I fix it?

1条回答
兄弟一词,经得起流年.
2楼-- · 2020-02-02 04:27

Make sure you have the following code in your .htaccess file on the top. You can find this file in the root of your WordPress.

RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $l [R=200,L]

Also enable CORS on your browser.

查看更多
登录 后发表回答