Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MAIN][UPD] - Deixando apenas os exemplos para NFSe
- Loading branch information
Claudio Alexssandro Lino
committed
Jul 12, 2021
1 parent
afc3488
commit cc2feb9
Showing
53 changed files
with
304 additions
and
954 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
exemple/Customers/04-ListaAllCustomers.php → exemple/05-DeleteNFSe.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
exemple/Customers/03-GetCustomersByID.php → exemple/06-ListAllNFSe.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
exemple/Customers/05-DeleteCustomersByID.php → exemple/07-GetNFSeByID.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
include_once(__DIR__.'/../../vendor/autoload.php'); | ||
|
||
use NotaFacil\Nfse\Services\NSFeConsultNotaFacil; | ||
use NotaFacil\Common\Exceptions\NotaFacilException; | ||
|
||
try { | ||
|
||
$credentialsToken = [ | ||
"consumer-id" => "CONSUMER_ID", | ||
"token-bearer" => "TOKEN_BEARER" | ||
]; | ||
|
||
$payload = [ | ||
"ids" => [ | ||
56491,55887,47222 | ||
] | ||
]; | ||
|
||
$services = (new NSFeConsultNotaFacil($credentialsToken))->consultRPS($payload); | ||
|
||
dump($services->getContent(), $services->getStatusCode()); | ||
|
||
} catch (NotaFacilException $th) { | ||
dump($th->getMessage(), $th->getCode()); | ||
} |
12 changes: 8 additions & 4 deletions
12
...rs/14-GetAdditionalPhoneCustomersByID.php → exemple/09-ConsultByNFSe.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 8 additions & 4 deletions
12
...3-ListAllAdditionalPhoneCustomersByID.php → exemple/10-ConsultNFSe.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
include_once(__DIR__.'/../../vendor/autoload.php'); | ||
|
||
use NotaFacil\Nfse\Services\NSFeNotaFacil; | ||
use NotaFacil\Common\Exceptions\NotaFacilException; | ||
|
||
try { | ||
|
||
$credentialsToken = [ | ||
"consumer-id" => "CONSUMER_ID", | ||
"token-bearer" => "TOKEN_BEARER" | ||
]; | ||
|
||
$payload = [ | ||
"nfs_totais" => [ | ||
"valor_servico" => 50, | ||
"valor_deducoes" => 5 | ||
], | ||
"nfs_impostos" => [ | ||
[ | ||
"tipo" => "IR", | ||
"reter" => true, | ||
"aliquota" => 6.55 | ||
], | ||
[ | ||
"tipo" => "INSS", | ||
"reter" => true, | ||
"aliquota" => 5.50 | ||
] | ||
], | ||
"nfs_construcao_civil" => [ | ||
"valor_material" => 50 | ||
] | ||
]; | ||
|
||
$services = (new NSFeNotaFacil($credentialsToken))->calculation($payload); | ||
|
||
dump($services->getContent(), $services->getStatusCode()); | ||
|
||
} catch (NotaFacilException $th) { | ||
dump($th->getMessage(), $th->getCode()); | ||
} |
13 changes: 6 additions & 7 deletions
13
...rs/11-AddAdditionalPhoneCustomersByID.php → exemple/12-AddParamNFSe.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
include_once(__DIR__.'/../../vendor/autoload.php'); | ||
|
||
use NotaFacil\Nfse\Services\NSFeParamNotaFacil; | ||
use NotaFacil\Common\Exceptions\NotaFacilException; | ||
|
||
try { | ||
|
||
$credentialsToken = [ | ||
"consumer-id" => "CONSUMER_ID", | ||
"token-bearer" => "TOKEN_BEARER" | ||
]; | ||
|
||
$services = (new NSFeParamNotaFacil($credentialsToken))->getParamNFSe( NSFeParamNotaFacil::PRODUCTION_ENVIRONMENT ); | ||
|
||
dump($services->getContent(), $services->getStatusCode()); | ||
|
||
} catch (NotaFacilException $th) { | ||
dump($th->getMessage(), $th->getCode()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
include_once(__DIR__.'/../../vendor/autoload.php'); | ||
|
||
use NotaFacil\Nfse\Services\NSFeParamNotaFacil; | ||
use NotaFacil\Common\Exceptions\NotaFacilException; | ||
|
||
try { | ||
|
||
$credentialsToken = [ | ||
"consumer-id" => "CONSUMER_ID", | ||
"token-bearer" => "TOKEN_BEARER" | ||
]; | ||
|
||
$services = (new NSFeParamNotaFacil($credentialsToken))->getParamNFSe( NSFeParamNotaFacil::PARAM_APPROVAL_ENVIRONMENT ); | ||
|
||
dump($services->getContent(), $services->getStatusCode()); | ||
|
||
} catch (NotaFacilException $th) { | ||
dump($th->getMessage(), $th->getCode()); | ||
} |
Oops, something went wrong.