diff --git a/src/Davispeixoto/LaravelSalesforce/Salesforce.php b/src/Davispeixoto/LaravelSalesforce/Salesforce.php index 700caec..5120e29 100644 --- a/src/Davispeixoto/LaravelSalesforce/Salesforce.php +++ b/src/Davispeixoto/LaravelSalesforce/Salesforce.php @@ -47,21 +47,22 @@ public function __call($method, $args) * @param $configExternal * @throws SalesforceException */ + public function connect($configExternal) { - $wsdl = $configExternal->get('salesforce.wsdl'); + $wsdl = $configExternal->get('laravel-salesforce::wsdl'); if (empty($wsdl)) { $wsdl = __DIR__ . '/Wsdl/enterprise.wsdl.xml'; } - $user = $configExternal->get('salesforce.username'); - $pass = $configExternal->get('salesforce.password'); - $token = $configExternal->get('salesforce.token'); + $username = $configExternal->get('laravel-salesforce::username'); + $password = $configExternal->get('laravel-salesforce::password'); + $token = $configExternal->get('laravel-salesforce::token'); try { $this->sfh->createConnection($wsdl); - $this->sfh->login($user, $pass . $token); + $this->sfh->login($username, $password . $token); } catch (Exception $e) { throw new SalesforceException('Exception at Constructor' . $e->getMessage() . "\n\n" . $e->getTraceAsString()); }