【发布时间】:2021-11-16 17:44:12
【问题描述】:
- 在 laravel Php 中购物公共 api。在 laravel 7 中运行应用程序到这种类型的错误显示
【问题讨论】:
-
错误在哪里,请在您的问题中添加详细信息以便能够提供帮助
标签: php html laravel laravel-5 laravel-7
【问题讨论】:
标签: php html laravel laravel-5 laravel-7
公共 API 这假设您使用正确的键和重定向 URI 在合作伙伴的仪表板中正确设置了您的应用程序。
REST(同步) 对于 REST 调用,需要商店域和访问令牌。
use Osiset\BasicShopifyAPI\BasicShopifyAPI;
use Osiset\BasicShopifyAPI\Options;
use Osiset\BasicShopifyAPI\Session;
// Create options for the API
$options = new Options();
$options->setVersion('2020-01');
// Create the client and session
$api = new BasicShopifyAPI($options);
$api->setSession(new Session('example.myshopify.com', 'access-token-here'));
// Now run your requests...
$result = $api->rest(...);
【讨论】: