diff --git a/src/Services/AdaptivePayments.php b/src/Services/AdaptivePayments.php index de05d49d..1d5bf6f9 100644 --- a/src/Services/AdaptivePayments.php +++ b/src/Services/AdaptivePayments.php @@ -21,7 +21,7 @@ public function __construct() private function setConfig() { // Setting Http Client - $this->client = new Client(); + $this->client = $this->setClient(); $paypal = config('paypal'); diff --git a/src/Traits/PayPalRequest.php b/src/Traits/PayPalRequest.php index 0a9a66ef..2f959363 100644 --- a/src/Traits/PayPalRequest.php +++ b/src/Traits/PayPalRequest.php @@ -24,7 +24,7 @@ trait PayPalRequest private function setConfig() { // Setting Http Client - $this->client = new Client(); + $this->client = $this->setClient(); $paypal = config('paypal'); @@ -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 *