@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | private function generateAuthenticationEnvelope($pubKey, $terminalID, $password, $amount) |
44 | 44 | { |
45 | - $data = $terminalID . $password . str_pad($amount, 12, '0', STR_PAD_LEFT) . '00'; |
|
45 | + $data = $terminalID.$password.str_pad($amount, 12, '0', STR_PAD_LEFT).'00'; |
|
46 | 46 | $data = hex2bin($data); |
47 | 47 | $AESSecretKey = openssl_random_pseudo_bytes(16); |
48 | 48 | $ivlen = openssl_cipher_iv_length($cipher = "AES-128-CBC"); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $hmac = hash('sha256', $ciphertext_raw, true); |
52 | 52 | $crypttext = ''; |
53 | 53 | |
54 | - openssl_public_encrypt($AESSecretKey . $hmac, $crypttext, $pubKey); |
|
54 | + openssl_public_encrypt($AESSecretKey.$hmac, $crypttext, $pubKey); |
|
55 | 55 | |
56 | 56 | return array( |
57 | 57 | "data" => bin2hex($crypttext), |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
104 | 104 | curl_setopt($ch, CURLOPT_HTTPHEADER, array( |
105 | 105 | 'Content-Type: application/json', |
106 | - 'Content-Length: ' . strlen($dataString) |
|
106 | + 'Content-Length: '.strlen($dataString) |
|
107 | 107 | )); |
108 | 108 | |
109 | 109 | $result = curl_exec($ch); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
171 | 171 | curl_setopt($ch, CURLOPT_HTTPHEADER, array( |
172 | 172 | 'Content-Type: application/json', |
173 | - 'Content-Length: ' . strlen($dataString) |
|
173 | + 'Content-Length: '.strlen($dataString) |
|
174 | 174 | )); |
175 | 175 | |
176 | 176 | $result = curl_exec($ch); |