Php 使用BigCommerce创建Webhook
我正试图在Bigcommerce平台上创建一个webhook来连接一个外部URL 我不确定我是否做对了 我正在使用以下URL发布参数:Php 使用BigCommerce创建Webhook,php,curl,bigcommerce,Php,Curl,Bigcommerce,我正试图在Bigcommerce平台上创建一个webhook来连接一个外部URL 我不确定我是否做对了 我正在使用以下URL发布参数: https://www.radwellnesscenter.com/api/v2/hooks.json 我收到以下错误:“未找到请求的资源” 以下是使用的PHP代码: curl_setopt($ch, CURLOPT_URL, $url); curl_setopt( $ch, CURLOPT_HTTPHEADER, array ('Accept: applic
https://www.radwellnesscenter.com/api/v2/hooks.json
我收到以下错误:“未找到请求的资源”
以下是使用的PHP代码:
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt( $ch, CURLOPT_HTTPHEADER, array ('Accept: application/json', 'Content-Length: 0') );
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
curl_setopt( $ch, CURLOPT_USERPWD, $username . ":" . $client_token);
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );
curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 0 );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
你能告诉我,这里少了什么吗 有两个问题: