diff --git a/public/index.php b/public/index.php index d8e1d1f..3831ddd 100644 --- a/public/index.php +++ b/public/index.php @@ -1,3 +1,10 @@ generateAuthHmac($timestamp, $this->apiSecurityKey); - $hashedPassword = $this->generateAuthHmac(hash('sha256', $this->apiPassword), $authKey); + $hashedPassword = $this->generateAuthHmac( + hash('sha256', $this->apiPassword), $authKey + ); // Add authentication parameters to the request data. $data = array_merge([ @@ -106,12 +106,13 @@ public function sendRequest( /** * Generates an HMAC SHA256 hash using the API security key. * - * @param string $message The message to hash. - * @param string $secret The secret key for HMAC. + * @param string $message The message to hash. + * @param string $secret The secret key for HMAC. + * * @return string The base64-encoded HMAC hash. */ private function generateAuthHmac($message, $secret): string { - return base64_encode(hash_hmac('sha256', $message, $secret, true)); + return base64_encode(hash_hmac('sha256', $message, $secret, TRUE)); } } diff --git a/src/Model/Product.php b/src/Model/Product.php index 72575aa..aa717f3 100644 --- a/src/Model/Product.php +++ b/src/Model/Product.php @@ -7,7 +7,10 @@ * * @package QuickTopUpAPI\Model * - * A simple product model. + * Note. This is a simple product model, in a real scenario it will be + * a database model. + * + * Not currently used, created to expand functionality. */ class Product {