Migrated from Redmine #943 | Author: Tracey Van Puyvelde Status: Feedback | Priority: High, I’m very impatient | Created: 2022-10-12
The External Booking Validator custom feature is not allowing data to be read from PHP.
The data from this is null:
$incomingData = json_decode(file_get_contents(‘php://input’),true);
I found that this could be because these extension are not enabled in php.ini
allow_url_fopen has to be enabled and ssl has to be open: extension=php_openssl.dll
this code is valid and you should get an array with data
if you get a different result, you need to check your server settings.
Maybe your web server has a redirect from an URL starting with www to an URL without www, or from URLs using HTTP to URLs using HTTPS. Check your web server logs to verify this, and act accordingly to avoid the redirection when making calls to the web service.
I’m getting data!! Thanks so much! I didn’t know I had to have an SSL certificate for my heroku application.
How can I get the (sample) data that is being returned from php://input?
I can get the service id with $incomingData[‘service_id’] but I have to validate the total quantity of products. So I have to evaluate the products array.
But $incomingData[‘products’] is not returning anything.