It looks like your PHP cURL request isn't working because you're not properly setting the
Code:
CURLOPT_CUSTOMREQUEST
option; it should be a string, so change...