【发布时间】:2012-09-20 06:17:29
【问题描述】:
我正在使用“cmcdonaldca”的shopify PHP客户端-https://github.com/cmcdonaldca/ohShopify.php
在创建 webhook 时,它会在响应中给出词法错误。这里是代码。
$sc = new ShopifyClient($_SESSION['shop'], $_SESSION['token'], $api_key, $secret);
$b = '{"webhook":{"topic":"orders/create","address":"http://www.abc.com","format":"json"}}';
try
{
$webhooks = $sc->call('POST','/admin/webhooks.json',$b);
}
catch (ShopifyApiException $e)
{
var_dump($e->getResponse());
}
【问题讨论】: