首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >BigCommerce Webhook未触发

BigCommerce Webhook未触发
EN

Stack Overflow用户
提问于 2014-06-26 14:19:07
回答 1查看 1K关注 0票数 6

我使用以下代码在BigCommerce中创建了一个webhook:

代码语言:javascript
复制
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'
)));

我得到的回应如下:

代码语言:javascript
复制
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。有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2014-06-27 08:16:06

ClientID & ClientSecret?

我假设您正在使用标准(现在是旧的)身份验证,而不是使用OAuth进行集成?webhooks需要OAuth (请参阅文档)。

我知道您有HTTPS,但您还需要来自可信CA的有效证书。(只是因为它通常是一个问题而提到)

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24423637

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档