私は基本認証bigcommerceでwebhooksを使用するには?
Bigcommerce::configure(array(
'store_url' => 'https://store.mybigcommerce.com',
'username' => 'admin',
'api_key' => 'd81aada4xc34xx3e18f0xxxx7f36ca'
));
との接続を正常に作成することができる午前、https://github.com/bigcommerce/bigcommerce-api-phpで を多くのことを試してみましたが、私は「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'
));
にしようとすると、それはこのエラーを示しています
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で大口商業のwebhooksを使用できますか?
エラーの説明があるようです。 '$ request'は有効範囲にありません。使用するフレームワークに応じて、$ _REQUESTパラメータにアクセスする人が変更されます。これはwebhook登録とは関係ありません。 –