Skip to content

This will be a PHP library offering API access (currently SOAP but in future also REST) to 3dCart API

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE.md
MIT
license.txt
Notifications You must be signed in to change notification settings

Menes1337/3dcart-api-php-client

Repository files navigation

Build Status codecov Codacy Badge

3dcart PHP Api-Client

Project properties

Codestyle: PSR-1 (http://www.php-fig.org/psr/psr-1/) / PSR-2 (http://www.php-fig.org/psr/psr-2/)

Autoloading: PSR-4 (http://www.php-fig.org/psr/psr-4/)

Minimum PHP Version: 5.6

Example usage

Project Initialization

git clone https://github.com/Menes1337/3dcart-api-php-client.git
cd 3dcart-api-php-client
composer install

Soap API

include('vendor' . DIRECTORY_SEPARATOR . 'autoload.php');

use \ThreeDCart\Primitive\StringValueObject;
    
$soapFactory = new \ThreeDCart\Api\Soap\Factory();
$soapClient  = $soapFactory->getApiClient(
    new StringValueObject('Your 3dcart API key'),
    new StringValueObject('yourstore.3dcartstores.com')
);

$customerObjects = $soapClient->getCustomers();

var_dump($customerObjects);

Advanced SOAP API

include('vendor' . DIRECTORY_SEPARATOR . 'autoload.php');

use \ThreeDCart\Primitive\StringValueObject;

$soapFactory = new \ThreeDCart\Api\Soap\Factory();
$advancedClient  = $soapFactory->getAdvancedApiClient(
    new StringValueObject('Your 3dcart API key'),
    new StringValueObject('yourstore.3dcartstores.com')
);

$plainCustomersArray = $advancedClient->runQuery(
    new StringValueObject('SELECT * FROM customer')
);

var_dump($plainCustomersArray);

Contributing

You are welcome to contribute!

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Make sure the codestyle (PSR-1 / PSR-2) is applied to your changes, your code is PHP Unit tested and can be executed on PHP 5.6/7.0/7.1
  4. Commit your changes (git commit -am 'Add some feature'))
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new pull request

About

This will be a PHP library offering API access (currently SOAP but in future also REST) to 3dCart API

Topics

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE.md
MIT
license.txt

Stars

Watchers

Forks

Packages

No packages published

Languages