This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//timestamp of when sms is sent in UTC+0 | |
$x_timestamp = "2021-11-03T06:17:41.883Z"; | |
//set to the same value as reference in the payload | |
$x_reference = "3fa85f64-5717-4562-b3fc-2c963f66afa6"; | |
//data to use to generate the sms-auth-token | |
$data = $x_timestamp . $x_reference; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//set to the timestamp exactly the same as that provided in the request payload | |
$data = "2021-11-03T06:17:41.883Z"; | |
//set to the secret that must have been shared between the 2 parties | |
$secret = "-very-secret-string-"; | |
//sample of the x-auth-token | |
printf("x-auth-token: %s", base64_encode(hash_hmac('sha512', $data, $secret, true))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$priv_key = file_get_contents("./key.pem"); | |
$pkeyid = openssl_get_privatekey($priv_key); | |
$date_time="2016-06-01 12:00:00"; | |
$amount="1000"; | |
$narrative="Test transaction"; | |
$network_ref="1000100"; |