shopgate / connect-integration-sdk-php
A PHP framework supporting the integration with the Shopgate Connect Platform.
Requires
- php: >=5.6
- ext-json: *
- defuse/php-encryption: ^2.2.0
- guzzlehttp/guzzle: ^6.0|^7.0
- guzzlehttp/psr7: ^1.4|^2.0
- kamermans/guzzle-oauth2-subscriber: ^1.0.6
- monolog/monolog: ^1.24|^2|^3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.15
- php-coveralls/php-coveralls: ^2.1
- phpunit/phpunit: ^5.0|^6.0|^7.0|^8.0|^9.0
- squizlabs/php_codesniffer: ^3.4
- yoast/phpunit-polyfills: ^1.0
- dev-master
- v2.1.1
- v2.1.1-beta.10
- v2.1.1-beta.9
- v2.1.1-beta.8
- v2.1.1-beta.7
- v2.1.1-beta.6
- v2.1.1-beta.5
- v2.1.1-beta.4
- v2.1.1-beta.3
- v2.1.1-beta.2
- v2.1.1-beta.1
- v2.1.0
- v2.0.0
- v2.0.0-beta.15
- v2.0.0-beta.14
- 2.0.0-beta.13
- 2.0.0-beta.12
- 2.0.0-beta.11
- v2.0.0-beta.10
- v2.0.0-beta.9
- v2.0.0-beta.8
- v2.0.0-beta.7
- v2.0.0-beta.6
- v2.0.0-beta.5
- v2.0.0-beta.4
- v2.0.0-beta.3
- v2.0.0-beta.2
- v2.0.0-beta.1
- v1.4.0
- v1.3.9
- v1.3.8
- v1.3.7
- v1.3.6
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.4
- 1.1.3
- 1.1.2
- 1.0.0
- 1.0.0-rc.1
- 0.9.0
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.0
- 0.4.8
- 0.4.7
- 0.4.6
- 0.4.5
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.0
- dev-dependabot/github_actions/dot-github/workflows/actions/download-artifact-4.1.7
This package is auto-updated.
Last update: 2025-03-03 23:33:38 UTC
README
The Shopgate Connect Integration SDK is a compilation of classes to manage the communication between your shop system and Shopgate Connect.
Create a developer account at https://developer.shopgate.com
Requirements
- PHP 5.6 and above
Installation
composer require shopgate/connect-integration-sdk-php
Or download and unzip from the releases page.
Migration to 2.x
If you're upgrading from 1.x to 2.x, read the migration guide.
Quick Start
Order creation example (see Order API docs for full request spec):
<?php use Shopgate\ConnectSdk\ShopgateSdk; $order = [ 'localeCode' => 'de-de', 'currencyCode' => 'EUR', 'addressSequences' => [...], 'primaryBillToAddressSequenceIndex' => 0, 'lineItems' => [...], 'subTotal' => 109.99, 'total' => 115.89, 'submitDate' => '2019-09-02T09:02:57.733Z', 'imported' => true ]; $config = [ 'merchantCode' => 'MERCHANT_CODE', 'clientId' => 'my-client', 'clientSecret' => '*******', 'username' => 'my.address@my-domain.com', 'password' => '*******', 'env' => 'pg' // Optional. "dev", "pg" or empty (= production) ]; $sgSdk = new ShopgateSdk($config); try { $response = $sgSdk->getOrderService()->addOrders([$order]); var_dump($resonse); } catch (\Exception $e) { var_dump($e); }
Configuration Parameters
- clientId (string) - oAuth2 client ID
- clientSecret (string) - oAuth2 client secret
- merchantCode (string) - merchant code provided to you upon registration
- username - (string) - the email address of the user called "Api Credentials" at Shopgate Next Admin
- password - (string) - the password of the user called "Api Credentials" at Shopgate Next Admin
- env (string, default: production) - one of "dev", "staging", "production"
Changelog
See CHANGELOG.md file for more information.
Contributing
See CONTRIBUTING.md file for more information.
About Shopgate
Shopgate is the leading mobile commerce platform.
License
The Shopgate Connect Integration SDK is available under the Apache License, Version 2.0.
See the LICENSE.md file for more information.
Advanced
"baseUri" Configuration
For testing against an echo service the baseUri config can be overridden. It defaults to
https://{service}.shopgate{env}.io/{version}/merchants/{merchantCode}/
, supporting template variables:
- service - the service name, different for each request
- env - the Shopgate environment-dependent domain suffix; this will automatically be replaced with one of "dev", "pg" (staging) or "" (production)
- version - the API version, may be different for each request
- merchantCode - the merchant code set in the configuration