put https://www.crekode.com/webhook/index.php?author_key=&type=&license_key=&item_id=
Verify the purchase! Is It Valid or Invalid?
<?php
$author_key = '...'; // Enter here your Author API Key
$type = '1'; // Don't change...
$license_key = '...'; // License key or Purchase code
$item_id = '...'; // Optional or Leave blank
if ($item_id > 0) {
$verification_link = "https://www.crekode.com/webhook/index.php?author_key=$author_key&type=$type&license_key=$license_key&item_id=$item_id";
} else {
$verification_link = "https://www.crekode.com/webhook/index.php?author_key=$author_key&type=$type&license_key=$license_key";
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL,$verification_link);
$results = curl_exec($ch);
curl_close($ch);
$results = json_decode($results);
if ($results->status == "valid") {
//Purchase is valid
//Run your code here
echo $results->message;
} elseif ($results->status == "invalid") {
echo $results->message;
} else {
echo $results->message;
}
?>