2017 © Pedro Peláez
 

library shopify-php-sdk

An unofficial Shopify PHP SDK

image

oanhnn/shopify-php-sdk

An unofficial Shopify PHP SDK

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 33 % Grown

The README.md

Shopify PHP SDK

Build Status Coverage Status, (*1)

Unoffical Shopify SDK for PHP, (*2)

Requirements

  • php >=7.1.3

Installation

Begin by pulling in the package through Composer., (*3)

$ composer require oanhnn/shopify-php-sdk php-http/guzzle6-adapter

Why php-http/guzzle6-adapter? We are decoupled from any HTTP messaging client with help by HTTPlug. You can find other HTTP messaging client implement \Http\Client\HttpClient in here., (*4)

Usage

$sdk = new ShopifySDK([
    'app_key' => getenv(static::APP_KEY_ENV_NAME),
    'app_secret' => getenv(static::APP_SECRET_ENV_NAME),
    'app_password' => getenv(static::APP_PASSWORD_ENV_NAME),
    'shop_domain' => 'your-store.myshopify.com',
    'http_client' => new \Http\Adapter\Guzzle6\Client(),
]);

// Make authorization url
$sdk->getAuthorizationUrl(
    'https://example.com/shopify',
    ['read_products', 'write_products'],
    ['state' => 'random-string']
);

// Get access token from code
$accessToken = $sdk->getAccessTokenFromCode(
    'https://example.com/shopify',
    $_GET['code']
);

// Get shop information
$shop = $sdk->setAccessToken($accessToken)->getClient()->get('/shop.json');

Changelog

See all change logs in CHANGELOG, (*5)

Testing

$ git clone git@github.com/oanhnn/shopify-php-sdk.git /path
$ cd /path
$ composer install
$ composer phpunit

Contributing

Please see CONTRIBUTING for details., (*6)

Security

If you discover any security related issues, please email to Oanh Nguyen instead of using the issue tracker., (*7)

Credits

License

This project is released under the MIT License.
Copyright © 2018 Oanh Nguyen., (*8)

The Versions