@@ -19,12 +19,21 @@ |
||
19 | 19 | const PRODUCCION = 'https://e-factura.sunat.gob.pe/ol-ti-itcpfegem/billService'; |
20 | 20 | const WSDL_ENDPOINT = 'https://e-beta.sunat.gob.pe/ol-ti-itcpfegem-beta/billService?wsdl'; |
21 | 21 | |
22 | + /** |
|
23 | + * @param string $user |
|
24 | + * @param string $password |
|
25 | + */ |
|
22 | 26 | public function __construct($user, $password) |
23 | 27 | { |
24 | 28 | parent::__construct($user, $password); |
25 | 29 | $this->setUrlWsdl(FeSunat::WSDL_ENDPOINT); |
26 | 30 | } |
27 | 31 | |
32 | + /** |
|
33 | + * @param string $content |
|
34 | + * |
|
35 | + * @return string |
|
36 | + */ |
|
28 | 37 | public function send($filename, $content) |
29 | 38 | { |
30 | 39 | $client = parent::getClient(); |
@@ -42,8 +42,7 @@ discard block |
||
42 | 42 | // echo $entry; |
43 | 43 | // } |
44 | 44 | |
45 | - } |
|
46 | - catch (\Exception $e) { |
|
45 | + } catch (\Exception $e) { |
|
47 | 46 | // $client->__getLastResponse() |
48 | 47 | return $e->getMessage(); |
49 | 48 | } |
@@ -66,8 +65,7 @@ discard block |
||
66 | 65 | // echo $entry; |
67 | 66 | // } |
68 | 67 | |
69 | - } |
|
70 | - catch (\Exception $e) { |
|
68 | + } catch (\Exception $e) { |
|
71 | 69 | // $client->__getLastResponse() |
72 | 70 | return $e->getMessage(); |
73 | 71 | } |
@@ -89,8 +87,7 @@ discard block |
||
89 | 87 | // echo $entry; |
90 | 88 | // } |
91 | 89 | |
92 | - } |
|
93 | - catch (\SoapFault $fault) { |
|
90 | + } catch (\SoapFault $fault) { |
|
94 | 91 | // $client->__getLastResponse() |
95 | 92 | // $fault->faultstring; |
96 | 93 | return $fault->faultcode; |