@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'DEFAULT@SECLEVEL=1'); |
82 | 82 | curl_setopt($ch, CURLOPT_HTTPHEADER, array( |
83 | 83 | 'Content-Type: application/json', |
84 | - 'Content-Length: ' . strlen($data_string) |
|
84 | + 'Content-Length: '.strlen($data_string) |
|
85 | 85 | )); |
86 | 86 | $result = curl_exec($ch); |
87 | 87 | curl_close($ch); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'DEFAULT@SECLEVEL=1'); |
145 | 145 | curl_setopt($ch, CURLOPT_HTTPHEADER, array( |
146 | 146 | 'Content-Type: application/json', |
147 | - 'Content-Length: ' . strlen($data_string) |
|
147 | + 'Content-Length: '.strlen($data_string) |
|
148 | 148 | )); |
149 | 149 | |
150 | 150 | $result = curl_exec($ch); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | */ |
243 | 243 | private function generateAuthenticationEnvelope($pub_key, $terminalID, $password, $amount) |
244 | 244 | { |
245 | - $data = $terminalID . $password . str_pad($amount, 12, '0', STR_PAD_LEFT) . '00'; |
|
245 | + $data = $terminalID.$password.str_pad($amount, 12, '0', STR_PAD_LEFT).'00'; |
|
246 | 246 | $data = hex2bin($data); |
247 | 247 | $AESSecretKey = openssl_random_pseudo_bytes(16); |
248 | 248 | $ivlen = openssl_cipher_iv_length($cipher = "AES-128-CBC"); |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | $hmac = hash('sha256', $ciphertext_raw, true); |
252 | 252 | $crypttext = ''; |
253 | 253 | |
254 | - openssl_public_encrypt($AESSecretKey . $hmac, $crypttext, $pub_key); |
|
254 | + openssl_public_encrypt($AESSecretKey.$hmac, $crypttext, $pub_key); |
|
255 | 255 | |
256 | 256 | return array( |
257 | 257 | "data" => bin2hex($crypttext), |