Skip to content

Synergy Wholesale API wrapper using SoapClient and packaged as a Laravel service provider

License

Notifications You must be signed in to change notification settings

hampel/synergy-wholesale-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synergy Wholesale API Wrapper for Laravel

Latest Version on Packagist Total Downloads Open Issues License

Synergy Wholesale API wrapper using SoapClient and packaged as a Laravel service provider

By Simon Hampel

This package provides a simple Laravel service provider and facade for our base Synergy Wholesale API wrapper package hampel/synergy-wholesale - please refer to the documentation about that package for instructions on how to use this API wrapper

Installation

To install using composer, run the following command:

composer require hampel/synergy-wholesale-laravel

You must generate an API key using the Synergy Wholesale control panel, which involves adding your web server's IP address to the whitelist - and then specify that key and your reseller ID in your .env file:

SYNERGY_WHOLESALE_API_KEY=your_synergy_wholesale_api_key
SYNERGY_WHOLESALE_RESELLER_ID=your_synergy_wholesale_reseller_id

Upgrading

Upgrading to v1.6 (Laravel v5.8)

In line with changes made in Laravel v5.8, cache expiry times are now specified in seconds rather than minutes. Be sure to adjust the value of all cache entries in the configsynergy-wholesale.cache.*.expiry to suit, if you have over-ridden the defaults.

Usage

Use Laravel's App facade to gain access to the service provider in your code:

use SynergyWholesale\Commands\CheckDomainCommand;

$sw = App::make('SynergyWholesale\SynergyWholesale');
$available = $sw->execute(new CheckDomainCommand(new Domain('example.com')));

... or chain them:

$available = App::make('SynergyWholesale\SynergyWholesale')->execute(new CheckDomainCommand(new Domain('example.com')));

... or just use the Facade instead:

$available = SynergyWholesale::execute(new CheckDomainCommand(new Domain('example.com')));

Refer to the usage examples and code in the Synergy Wholesale API Wrapper repository for more details about how to use the library.

About

Synergy Wholesale API wrapper using SoapClient and packaged as a Laravel service provider

Topics

Resources

License

Stars

Watchers

Forks

Languages