【发布时间】:2015-02-03 19:02:25
【问题描述】:
我使用以下代码在 BigCommerce 中创建了一个 webhook:
use Bigcommerce\Api\Connection;
$connection = new Connection();
$connection->setCipher('RC4-SHA');
$connection->verifyPeer(false);
$connection->addHeader('X-Auth-Client', $clientId);
$connection->addHeader('X-Auth-Token', $token);
$response = $connection->post('https://api.bigcommerce.com/stores/' . $hash . '/v2/hooks', json_encode(array(
'scope'=>'store/order/created',
'destination'=>'https://bigcommerce.example.com/order'
)));
我收到如下回复:
stdClass Object
(
[id] => 568
[client_id] => lms4gxejy2xw2bia7w30v3bal1sz5yz
[store_hash] => xxxxxx
[scope] => store/order/created
[destination] => https://bigcommerce.example.com/order
[headers] =>
[is_active] => 1
[created_at] => 1403762563
[updated_at] => 1403762563
)
但是,无论何时下订单,我都没有收到 BigCommerce 对https://bigcommerce.example.com/order 的任何回电。该网站具有有效的 SSL。有什么想法吗?
【问题讨论】:
-
首先,能否请您明确一下您是否将目的地从原始代码更改为您在此处发布的代码?
-
这里也一样。使用 OAuth,钩子成功创建并激活,有效的 ssl 证书,但没有回调。这似乎是一个普遍的问题。
-
这里有人运气好吗?几周以来我一直遇到同样的问题,但不明白是什么导致 webhook 不触发。我使用 OAuth 成功创建了钩子,并且我的目的地正在使用来自 CA 的有效 SSL 证书。我绝对没有得到 BigCommerce 支持对此问题的回应。我已经和他们一起开了两个多星期的票,每次我打电话检查状态时,他们都会给我跑来跑去。非常非常令人沮丧。
-
我已联系 BigCommerce 并等待他们的回复。看来问题出在他们这边。
-
@SeiKan,你在这里运气好吗?我也没有收到 BigCommerce 关于同一问题的回复。对此非常没有反应,我不知道为什么。一个多月来,我与他们就这个问题有一个悬而未决的案例。
标签: php bigcommerce