From 91c64c63ec766ede5ff7a99630bac00de00b4598 Mon Sep 17 00:00:00 2001 From: "Mavelo, LLC" Date: Wed, 9 Oct 2024 16:03:25 -0500 Subject: [PATCH 1/3] Update OAuth2Authenticator.php PHP Unknown: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in src/OAuth/OAuth2Authenticator.php on line 271 --- src/OAuth/OAuth2Authenticator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OAuth/OAuth2Authenticator.php b/src/OAuth/OAuth2Authenticator.php index 23f1680..101bf4f 100644 --- a/src/OAuth/OAuth2Authenticator.php +++ b/src/OAuth/OAuth2Authenticator.php @@ -268,7 +268,7 @@ private function generateQueryParemeterStringForAuthorizationCodeURL() : string 'response_type' => 'code', 'state' => $this->getState() ); - return http_build_query($parameters, null, '&', PHP_QUERY_RFC3986); + return http_build_query($parameters, '', '&', PHP_QUERY_RFC3986); } public function setState($state) From d5408a43801165c5789ccd46a8d042926321d1cb Mon Sep 17 00:00:00 2001 From: "Mavelo, LLC" Date: Fri, 11 Oct 2024 11:35:05 -0500 Subject: [PATCH 2/3] Update PaymentClient.php --- src/PaymentClient.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/PaymentClient.php b/src/PaymentClient.php index 026eb73..1d56963 100644 --- a/src/PaymentClient.php +++ b/src/PaymentClient.php @@ -92,7 +92,6 @@ public function charge(Charge $charge, string $requestId = "") : ResponseInterfa } $request = ChargeOperations::createChargeRequest($charge, $requestId, $this->getContext()); - $response = $this->httpClient->send($request); $this->before($request, $this); $response = $this->httpClient->send($request); $this->after($response, $this); @@ -107,7 +106,6 @@ public function voidChargeTransaction(string $chargeRequestId, string $requestId } $request = ChargeOperations::voidTransaction($chargeRequestId, $requestId, $this->getContext()); - $this->httpClient->send($request); $this->before($request, $this); $response = $this->httpClient->send($request); $this->after($response, $this); From dec7fc9d52b70a30172f15356089e74066efc6dc Mon Sep 17 00:00:00 2001 From: "Mavelo, LLC" Date: Fri, 11 Oct 2024 11:44:47 -0500 Subject: [PATCH 3/3] Update PaymentClient.php See https://github.com/intuit/PHP-Payments-SDK/pull/28 --- src/PaymentClient.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PaymentClient.php b/src/PaymentClient.php index 1d56963..b102a44 100644 --- a/src/PaymentClient.php +++ b/src/PaymentClient.php @@ -59,7 +59,11 @@ public function __construct(array $context = null) }else{ $this->context = new ClientContext(); } - $this->httpClient = ClientFactory::buildCurlClient(); + $this->httpClient = ClientFactory::buildCurlClient( + isset($context['connection_time_out']) ? $context['connection_time_out'] : 10, + isset($context['request_time_out']) ? $context['request_time_out'] : 100, + isset($context['is_verify']) ? $context['is_verify'] : false + ); $this->interceptors = array(); }