Tôi tạo ra một webhook trong BigCommerce sử dụng mã sau đây:BigCommerce Webhook không kích hoạt
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'
)));
tôi đều có phản ứng như sau:
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
)
Tuy nhiên, tôi không bao giờ có bất kỳ callbacks để https://bigcommerce.example.com/order từ BigCommerce bất cứ khi nào đặt hàng. Trang web đang có SSL hợp lệ. Bất kỳ ý tưởng?
Trước tiên, bạn có thể làm rõ về việc bạn đã thay đổi điểm đến từ mã ban đầu của mình thành mã bạn đã đăng ở đây không? – developerscott
Có, tôi đã thay đổi vấn đề về quyền riêng tư do đích đến. –
Tương tự ở đây. Sử dụng OAuth, hook tạo thành công và chứng chỉ ssl hoạt động hợp lệ, nhưng không có callbacks. Nó có vẻ là một vấn đề phổ biến. – oumlaote