1

I'm having issues with setting up webhooks with PayPal.

Actions Taken: I have set up a hook to alert me of completed payments. I do notice that PayPal does hit the requested url. However when I do a complete log of $_POST, $_Get and $_COOKIES there is nothing sent.

My understanding as that the server is meant to send data in the POST form.

Any help would be greatly appreciated. Thanks.


Update: Solution to this FOUND!!!

$request_body = file_get_contents('php://input');
$request_body = json_decode($request_body);
$request_body = print_r($request_body, true);

I found that PayPal posts the JSON string a different way other then via POST. The above code is how I was able to retrieve the required data.

Thanks again guys for the input.

Hodds
  • 35
  • 1
  • 6

0 Answers0