Skip to content

Commit

Permalink
fix connect method after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
davispeixoto committed Oct 10, 2016
1 parent 593b59d commit 9d6efa1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Davispeixoto/LaravelSalesforce/Salesforce.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 9d6efa1

Please sign in to comment.