I am trying to interface with the Clickbank API for support ticket creation (https://api.clickbank.com/rest/1.2/tickets/).
I can't seem to get it to work with CURL. I can get the API working fine using GET (fetching order information), but not POST (required for changes to orders).
Here's my code, which returns an error 404 from Clickbank.
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.clickbank.com/rest/1.2/tickets/FNKBEP34?type=cncl&reason=ticket.type.cancel.7");
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/xml", "Authorization: removed_dev_key:removed_api_key"));
$result = curl_exec($ch);
curl_close($ch);
print $result;
?>
I've been able to POST successfully with RESTClient2.3. But I haven't been able to duplicate that with CURL.