1 | <?php |
||
17 | class Keys |
||
18 | { |
||
19 | /** |
||
20 | * Build 44 digits keys to NFe, NFCe, CTe and MDFe |
||
21 | * @param string $cUF UF number |
||
22 | * @param string $ano year |
||
23 | * @param string $mes month |
||
24 | * @param string $cnpj or CPF |
||
25 | * @param string $mod model of document 55, 65, 57 etc |
||
26 | * @param string $serie |
||
27 | * @param string $numero document number |
||
28 | * @param string $tpEmis emission type |
||
29 | * @param string $codigo random number or document number |
||
30 | * @return string |
||
31 | */ |
||
32 | 2 | public static function build( |
|
66 | |||
67 | /** |
||
68 | * Verifies that the key provided is valid |
||
69 | * @param string $key |
||
70 | * @return boolean |
||
71 | */ |
||
72 | 2 | public static function isValid($key) |
|
84 | |||
85 | /** |
||
86 | * This method calculates verifying digit |
||
87 | * @param string $key |
||
88 | * @return string |
||
89 | */ |
||
90 | 6 | public static function verifyingDigit($key) |
|
110 | |||
111 | /** |
||
112 | * Generate and return a 8 digits random number |
||
113 | * for cNF tag |
||
114 | * @return string |
||
115 | */ |
||
116 | public static function random() |
||
120 | } |
||
121 |