Skip to content

Commit

Permalink
Fix response error for IPN
Browse files Browse the repository at this point in the history
  • Loading branch information
srmklive committed Jan 4, 2017
1 parent 7b54f72 commit 840fa20
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Traits/PayPalRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,19 @@ private function doPayPalRequest($method, $params)
/**
* Parse PayPal NVP Response.
*
* @param string $string
* @param string|\GuzzleHttp\Psr7\Request $request
*
* @return array
*/
private function retrieveData($string)
private function retrieveData($request)
{
$response = [];
parse_str($string, $response);

if ($request instanceof \GuzzleHttp\Psr7\Request) {
$request = \GuzzleHttp\Psr7\Str($request);
}

parse_str($request, $response);

return $response;
}
Expand Down

0 comments on commit 840fa20

Please sign in to comment.