I noticed you called json_decode with an @ symbol in front of it inside the makeCurlPost function in the PHP demo: https://github.com/xfrocks/bdApi/blob/master/php_demo/functions.php#L152 What is the purpose of the @ symbol?
It's PHP error control operator. See it here http://php.net/manual/en/language.operators.errorcontrol.php PHP: Error Control - Manual php.net Basically the demo uses it to avoid output error / warning if the data is not a valid json.