diff --git a/composer.json b/composer.json index f16bc36..44de3d2 100644 --- a/composer.json +++ b/composer.json @@ -1,36 +1,47 @@ { - "name": "boletosimples/boletosimples", - "type": "library", - "description": "A PHP client library for easily accessing Boleto Simples API.", - "keywords": ["boleto","simples","boletosimples","ecommerce"], - "homepage": "http://api.boletosimples.com.br", - "license": "MIT", - "authors": [ - { - "name": "Rafael Lima", - "email": "contato@rafael.adm.br", - "homepage": "http://rafael.adm.br/" - } - ], - "support": { - "email": "suporte@boletosimples.com.br", - "issues": "http://github.com/BoletoSimples/boletosimples-php/issues", - "sources": "https://github.com/BoletoSimples/boletosimples-php" - }, - "require": { - "guzzlehttp/guzzle": "5.*", - "commerceguys/guzzle-oauth2-plugin": "2.*" - }, - "require-dev": { - "phpunit/phpunit": "4.5.*", - "php-vcr/php-vcr": "~1.2", - "php-vcr/phpunit-testlistener-vcr": "*", - "ptrofimov/xpmock": "dev-master" - }, - "autoload": { - "psr-4": { - "BoletoSimples\\": ["src/BoletoSimples","src/BoletoSimples/Resources"] - }, - "files": ["src/BoletoSimples.php"] - } -} + "name": "dolalima/boletosimples", + "type": "library", + "version": "1.0.0", + "description": "A PHP client library for easily accessing Boleto Simples API.", + "keywords": [ + "boleto", + "simples", + "boletosimples", + "ecommerce" + ], + "homepage": "http://api.kobana.com.br", + "license": "MIT", + "authors": [ + { + "name": "Rafael Lima", + "email": "contato@rafael.adm.br", + "homepage": "http://rafael.adm.br/" + } + ], + "support": { + "email": "suporte@kobana.com.br", + "issues": "http://github.com/BoletoSimples/boletosimples-php/issues", + "sources": "https://github.com/BoletoSimples/boletosimples-php" + }, + "require": { + "guzzlehttp/guzzle": "5.*", + "commerceguys/guzzle-oauth2-plugin": "2.*" + }, + "require-dev": { + "phpunit/phpunit": "4.5.*", + "php-vcr/php-vcr": "~1.2", + "php-vcr/phpunit-testlistener-vcr": "*", + "ptrofimov/xpmock": "dev-master" + }, + "autoload": { + "psr-4": { + "BoletoSimples\\": [ + "src/BoletoSimples", + "src/BoletoSimples/Resources" + ] + }, + "files": [ + "src/BoletoSimples.php" + ] + } +} \ No newline at end of file diff --git a/src/BoletoSimples/Configuration.php b/src/BoletoSimples/Configuration.php index 5b4a28d..4132999 100644 --- a/src/BoletoSimples/Configuration.php +++ b/src/BoletoSimples/Configuration.php @@ -2,14 +2,16 @@ namespace BoletoSimples; -class Configuration { - private $environments_uri = array('sandbox' => 'https://sandbox.boletosimples.com.br/api/v1/', 'production' => 'https://boletosimples.com.br/api/v1/'); +class Configuration +{ + private $environments_uri = array('sandbox' => 'https://api-sandbox.kobana.com.br/v1/', 'production' => 'https://api.kobana.com.br/v1/'); public $environment = null; public $application_id = null; public $application_secret = null; public $access_token = null; - public function __construct($params = array()) { + public function __construct($params = array()) + { $default_environment = getenv('BOLETOSIMPLES_ENV') ? getenv('BOLETOSIMPLES_ENV') : 'sandbox'; $default_application_id = getenv('BOLETOSIMPLES_APP_ID') ? getenv('BOLETOSIMPLES_APP_ID') : null; $default_application_secret = getenv('BOLETOSIMPLES_APP_SECRET') ? getenv('BOLETOSIMPLES_APP_SECRET') : null; @@ -21,16 +23,18 @@ public function __construct($params = array()) { $this->access_token = isset($params['access_token']) ? $params['access_token'] : $default_access_token; } - public function userAgent() { - return "BoletoSimples PHP Client v".\BoletoSimples::VERSION." (contato@boletosimples.com.br)"; + public function userAgent() + { + return "BoletoSimples PHP Client v" . \BoletoSimples::VERSION . " (contato@kobana.com.br)"; } - public function hasAccessToken() { + public function hasAccessToken() + { return $this->access_token != null; } - public function baseUri() { + public function baseUri() + { return $this->environments_uri[$this->environment]; } - -} \ No newline at end of file +}