는 내가 기본 인증bigcommerce에서 webhooks를 사용하는 방법?
Bigcommerce::configure(array(
'store_url' => 'https://store.mybigcommerce.com',
'username' => 'admin',
'api_key' => 'd81aada4xc34xx3e18f0xxxx7f36ca'
));
에 성공적으로 연결을 만들 수 있어요하지만 난 "OAuth를"로 할 때
In order to obtain the auth_token you would consume Bigcommerce::getAuthToken method
$object = new \stdClass();
$object->client_id = 'xxxxxx';
$object->client_secret = 'xxxxx;
$object->redirect_uri = 'https://app.com/redirect';
$object->code = $request->get('code');
$object->context = $request->get('context');
$object->scope = $request->get('scope');
$authTokenResponse = Bigcommerce::getAuthToken($object);
Bigcommerce::configure(array(
'client_id' => 'xxxxxxxx',
'auth_token' => $authTokenResponse->access_token,
'store_hash' => 'xxxxxxx'
));
그것은이 오류를 보여줍니다 , https://github.com/bigcommerce/bigcommerce-api-php으로 많이 시도 :
Notice: Undefined variable: request in /var/www/html/tests/bigcommerce/test/index.php on line 25 Fatal error: Call to a member function get() on a non-object in /var/www/html/tests/bigcommerce/test/index.php on line 25
누군가 저를 도와 줄 수 있습니까? php에서 bigcommerce의 webhook을 어떻게 사용할 수 있습니까?
오류 자체에 대한 설명이있는 것 같습니다. '$ request'는 범위 안에 없습니다. 사용하는 프레임 워크에 따라 $ _REQUEST 매개 변수에 액세스하는 사용자가 변경됩니다. 이것은 webhook 등록과 관련이 없습니다. –