1 | <?php |
||
16 | class Keys |
||
17 | { |
||
18 | /** |
||
19 | * Build 44 digits keys to NFe, NFCe, CTe and MDFe |
||
20 | * @param string $cUF UF number |
||
21 | * @param string $ano year |
||
22 | * @param string $mes month |
||
23 | * @param string $cnpj |
||
24 | * @param string $mod model of document 55, 65, 57 etc |
||
25 | * @param string $serie |
||
26 | * @param string $numero document number |
||
27 | * @param string $tpEmis emission type |
||
28 | * @param string $codigo random number or document number |
||
29 | * @return string |
||
30 | */ |
||
31 | 1 | public static function build( |
|
60 | |||
61 | /** |
||
62 | * Verifies that the key provided is valid |
||
63 | * @param string $key |
||
64 | * @return boolean |
||
65 | */ |
||
66 | 2 | public static function isValid($key) |
|
78 | |||
79 | /** |
||
80 | * This method calculates verifying digit |
||
81 | * @param string $key |
||
82 | * @return string |
||
83 | */ |
||
84 | 5 | public static function verifyingDigit($key) |
|
104 | |||
105 | /** |
||
106 | * Generate and return a 8 digits random number |
||
107 | * for cNF tag |
||
108 | * @return string |
||
109 | */ |
||
110 | public static function random() |
||
114 | } |
||
115 |