everypay / shopify-api
Shopify API Library for PHP
Requires
- php: ^7.4 || ^8.0 || ^8.1
- doctrine/inflector: ^2.0
- firebase/php-jwt: ^5.2
- guzzlehttp/guzzle: ^7.0
- psr/http-client: ^1.0
- psr/log: ^1.1
- ramsey/uuid: ^4.1
Requires (Dev)
- mikey179/vfsstream: ^1.6
- phpunit/phpunit: ^9
- squizlabs/php_codesniffer: ^3.6
- dev-main
- v3.0.1
- v3.0.0
- v2.0.1
- v2.0.0
- v1.0.1
- v1.0.0
- 0.0.2
- 0.0.2-alpha
- 0.0.1
- 0.0.1-alpha
- dev-bugfix/set-log-director-to-tmp
- dev-dependabot/composer/firebase/php-jwt-6.3.0
- dev-replace-cla-probot-with-action
- dev-dependabot/composer/guzzlehttp/guzzle-7.4.5
- dev-dependabot/composer/squizlabs/php_codesniffer-3.7.1
- dev-dependabot/composer/phpunit/phpunit-9.5.21
- dev-dependabot/composer/guzzlehttp/psr7-2.2.1
- dev-andyw8/enable-automated-merge-of-patch-dependencies
- dev-improve_initialize_docs
- dev-fixing_codeowners
This package is auto-updated.
Last update: 2024-11-20 16:40:05 UTC
README
This library provides support for PHP Shopify apps to access the Shopify Admin API, by making it easier to perform the following actions:
- Creating online or offline access tokens for the Admin API via OAuth
- Making requests to the REST API
- Making requests to the GraphQL API
- Registering/processing webhooks
In addition to the Admin API, this library also allows querying the Storefront API.
This library can be used in any application that has a PHP backend, since it doesn't rely on any specific frameworkâyou can include it alongside your preferred stack and only use the features that you need to build your app.
Requirements
To follow these usage guides, you will need to:
- have a basic understanding of PHP
- have a Shopify Partner account and development store
- OR have a test store where you can create a private app
- have a private or custom app already set up in your test store or partner account
- use ngrok, in order to create a secure tunnel to your app running on your localhost
- add the
ngrok
URL and the appropriate redirect for your OAuth callback route to your app settings
Getting started
You can follow our getting started guide to learn how to use this library's components.
- Getting started
- Performing OAuth
- REST Admin API
- Make a GraphQL API call
- Make a Storefront API call
- Webhooks
- Utilities
- Known issues and caveats
Developing this library
After cloning the repository, composer can install the dependencies:
composer install
To run tests:
composer test
If you want to get a code coverage report from the tests, you'll need to install the php-xdebug
extension by running pecl install xdebug
, and then run:
composer test -- [--coverage-text|--coverage-html=<path>]
You may have to clear composer's autoload cache when namespaces change:
composer dump-autoload
To run linter:
composer lint