I am trying to implement Quickpay API.
While doing so, I am also trying to make use of the callback-functionality as described here: https://learn.quickpay.net/tech-talk/api/callback/
And just to get started, I am using the PHP code-snippet found on the abovementioned page:
<?php
function sign($base, $private_key) {
return hash_hmac("sha256", $base, $private_key);
}
$request_body = file_get_contents("php://input");
$checksum = sign($request_body, "your_account_private_key");
if ($checksum == $_SERVER["HTTP_QUICKPAY_CHECKSUM_SHA256"]) {
// Request is authenticated
} else {
// Request is NOT authenticated
}
?>
However, looking at this code, I simply don't understand how/from where the $_SERVER["HTTP_QUICKPAY_CHECKSUM_SHA256"] should be populated with any value?
...and sure enough; merely hoping for magic and trying to execute the afforementioned code just gives me this error:
"Undefined index: HTTP_QUICKPAY_CHECKSUM_SHA256"
So... my question is: How should $_SERVER["HTTP_QUICKPAY_CHECKSUM_SHA256"] be set/populated?