Last active
January 27, 2020 08:42
-
-
Save ak4bento/5b9073e61a7ac049403b5bcef01cf30a to your computer and use it in GitHub Desktop.
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
public function index(){ | |
$HTTPMethod = 'GET'; | |
$RelativeUrl = '/banking/v3/corporates/h2hauto008/accounts/0613006572/statements?EndDate=2020-01-21&StartDate=2020-01-15'; | |
$AccessToken = $_GET['token']; | |
$Timestamp = '2020-01-23T13:11:00.000+07:00'; | |
$RequestBody = ''; | |
$StringToSign = | |
$HTTPMethod .":" . | |
$RelativeUrl .":" . | |
$AccessToken .":" . | |
strtolower(hash('sha256',$RequestBody)) .":" . | |
$Timestamp; | |
$hash = hash_hmac ('sha256', $StringToSign, '5e636b16-df7f-4a53-afbe-497e6fe07edc'); | |
return array( | |
'hash_hmac' => $hash, | |
'Stringtosign' => $StringToSign | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment