Skip to content

Commit c26684a

Browse files
committed
Add more info to Readme
1 parent 4d041bf commit c26684a

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,36 @@
1111

1212
[travis-status]: https://travis-ci.org/aleplusplus/soapclient-curl-php.svg?branch=maste
1313
[travis-url]: https://travis-ci.org/aleplusplus/soapclient-curl-php
14+
15+
## Install:
16+
17+
Via composer:
18+
19+
```
20+
$ composer require aleplusplus/soapclient-curl-php
21+
```
22+
23+
## Usage:
24+
25+
Using the `SoapClientCurl\SoapClientRequest`:
26+
27+
```php
28+
use SoapClientCurl\SoapClientRequest;
29+
30+
$claveAccesoComprobante = '1302201501179188978900110010010000100520001005215';
31+
32+
$url = 'https://celcer.sri.gob.ec/comprobantes-electronicos-ws/AutorizacionComprobantes';
33+
34+
$body = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ec="http://ec.gob.sri.ws.autorizacion">
35+
<soapenv:Header/>
36+
<soapenv:Body>
37+
<ec:autorizacionComprobante>
38+
<claveAccesoComprobante>'.$claveAccesoComprobante.'</claveAccesoComprobante>
39+
</ec:autorizacionComprobante>
40+
</soapenv:Body>
41+
</soapenv:Envelope>';
42+
43+
$headers = array('Content-Type: text/xml; charset=utf-8', 'Content-Length: '.strlen($body));
44+
45+
$result = SoapClientRequest::send($url, $headers, $body);
46+
```

0 commit comments

Comments
 (0)