Skip to content

Commit

Permalink
Merge pull request #12 from srmklive/adaptive-payments
Browse files Browse the repository at this point in the history
Removed Guzzle Client object creation error.
  • Loading branch information
srmklive committed Apr 8, 2016
2 parents abe8eb4 + 938db8a commit ffce25b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Services/AdaptivePayments.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct()
private function setConfig()
{
// Setting Http Client
$this->client = new Client();
$this->client = $this->setClient();

$paypal = config('paypal');

Expand Down
12 changes: 11 additions & 1 deletion src/Traits/PayPalRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ trait PayPalRequest
private function setConfig()
{
// Setting Http Client
$this->client = new Client();
$this->client = $this->setClient();

$paypal = config('paypal');

Expand Down Expand Up @@ -61,6 +61,16 @@ private function setConfig()
unset($paypal);
}

/**
* Function to Guzzle Client class object
*
* @return Client
*/
protected function setClient()
{
return new Client;
}

/**
* Verify PayPal IPN Response
*
Expand Down

0 comments on commit ffce25b

Please sign in to comment.