@@ -99,7 +99,7 @@ |
||
| 99 | 99 | { |
| 100 | 100 | $crc = 0xFFFF; |
| 101 | 101 | for ($i = 0; $i < strlen($data); $i++) { |
| 102 | - $x = (($crc >> 8) ^ ord($data[(string)$i])) & 0xFF; |
|
| 102 | + $x = (($crc >> 8) ^ ord($data[(string) $i])) & 0xFF; |
|
| 103 | 103 | $x ^= $x >> 4; |
| 104 | 104 | $crc = (($crc << 8) ^ ($x << 12) ^ ($x << 5) ^ $x) & 0xFFFF; |
| 105 | 105 | } |
@@ -30,11 +30,11 @@ discard block |
||
| 30 | 30 | $command .= self::INITIAL_METHOD_OF_QR; |
| 31 | 31 | |
| 32 | 32 | # Reference Code |
| 33 | - $ref_01 = $this->f('02', $ref_1); |
|
| 34 | - $ref_02 = $this->f('03', $ref_2); |
|
| 33 | + $ref_01 = $this->f('02', $ref_1); |
|
| 34 | + $ref_02 = $this->f('03', $ref_2); |
|
| 35 | 35 | $ref_command = self::SCB_PAYMENT_CODE . $billerId . $ref_01 . $ref_02; |
| 36 | 36 | |
| 37 | - $command .= $this->f('30', $ref_command); |
|
| 37 | + $command .= $this->f('30', $ref_command); |
|
| 38 | 38 | |
| 39 | 39 | # สกุลเงินบาท |
| 40 | 40 | $command .= self::TRANSACTION_CURRENCY_THB; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $command .= self::CHECKSUM_PREFIX; |
| 53 | 53 | $command .= $this->CRC16HexDigest($command); |
| 54 | 54 | |
| 55 | - if($rawdata == true){ |
|
| 55 | + if ($rawdata == true) { |
|
| 56 | 56 | header('Content-Type: text/html;'); |
| 57 | 57 | echo $command; exit; |
| 58 | 58 | } |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | { |
| 78 | 78 | $crc = 0xFFFF; |
| 79 | 79 | for ($i = 0; $i < strlen($data); $i++) { |
| 80 | - $x = (($crc >> 8) ^ ord($data[(string)$i])) & 0xFF; |
|
| 80 | + $x = (($crc >> 8) ^ ord($data[(string) $i])) & 0xFF; |
|
| 81 | 81 | $x ^= $x >> 4; |
| 82 | 82 | $crc = (($crc << 8) ^ ($x << 12) ^ ($x << 5) ^ $x) & 0xFFFF; |
| 83 | 83 | } |