我使用「cmcdonaldca」的shopify PHP客戶端 - https://github.com/cmcdonaldca/ohShopify.phpShopify詞法錯誤:在JSON文本字符無效
創造一個網絡掛接它給出response.here詞法錯誤代碼。 $ s = new ShopifyClient($ _ SESSION ['shop'],$ _SESSION ['token'],$ api_key,$ secret);} $ 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());
}