【问题标题】:Call Shopify api in laravel with Particular shopify store data?使用特定的 shopify 商店数据在 laravel 中调用 Shopify api?
【发布时间】:2021-11-16 17:44:12
【问题描述】:
  1. 在 laravel Php 中购物公共 api。在 laravel 7 中运行应用程序到这种类型的错误显示

【问题讨论】:

  • 错误在哪里,请在您的问题中添加详细信息以便能够提供帮助

标签: php html laravel laravel-5 laravel-7


【解决方案1】:

公共 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(...);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-07
    • 1970-01-01
    • 2015-07-07
    相关资源
    最近更新 更多