mcarrowsmith-packages / oauth2-shopify
v1.0
2022-09-17 16:12 UTC
Requires
- php: ^7.4 || ^8.0
- league/oauth2-client: ^2.6
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.11
- phpspec/phpspec: ^7.2
- phpstan/phpstan: ^1.8
- vlucas/phpdotenv: ^5.4
README
OAuth2 Shopify
PHP OAuth 2.0 提供商,扩展了 PHP League 的 OAuth Client。
安装
您可以通过 composer 安装此包。
composer require mcarrowsmith/oauth2-shopify
使用
请确保您已经通过 Shopify Partner 账户配置并创建了应用。
$provider = new \McArrowsmithPackages\Oauth2Shopify\ShopifyProvider([ 'shop' => '{example-shopify-store}.myshopify.com', 'clientId' => '{shopify-add-id}', 'clientSecret' => '{shopify-app-secret}', 'redirectUri' => 'https://{example-ngrok-subdomain}.ngrok.io/login' ]);
请参阅 web/login/index.php 以获取完整的工作流程示例。
测试
composer test
变更日志
请参阅 CHANGELOG 了解最近有哪些更改。
贡献
请参阅 CONTRIBUTING 了解详细信息。