From 4cd1772b107aca5fa6fc3c147514c6f4c9cf45ee Mon Sep 17 00:00:00 2001 From: David Blencowe Date: Thu, 29 Jun 2017 10:39:13 +0100 Subject: [PATCH] Remove call to filter() and replace with simpler if statement (#111) Remove call to filter() and replace with simpler if statement --- src/Traits/PayPalRequest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Traits/PayPalRequest.php b/src/Traits/PayPalRequest.php index ad590ce0..767ae925 100644 --- a/src/Traits/PayPalRequest.php +++ b/src/Traits/PayPalRequest.php @@ -327,10 +327,10 @@ private function createRequestPayload($method) 'METHOD' => $method, ], $this->options); - $this->post = $this->post->merge($config) - ->filter(function ($value, $key) use ($method) { - return (($method === 'verifyipn') && ($key === 'METHOD')) ?: $value; - }); + $this->post = $this->post->merge($config); + if ($method === 'verifyipn') { + $this->post->forget('METHOD'); + } } /**