Skip to content

Commit

Permalink
Remove call to filter() and replace with simpler if statement (#111)
Browse files Browse the repository at this point in the history
Remove call to filter() and replace with simpler if statement
  • Loading branch information
dblencowe authored and srmklive committed Jun 29, 2017
1 parent 8ad325f commit 4cd1772
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Traits/PayPalRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}

/**
Expand Down

0 comments on commit 4cd1772

Please sign in to comment.