-
Notifications
You must be signed in to change notification settings - Fork 1
/
api_tnt_mercurio.php
29 lines (27 loc) · 887 Bytes
/
api_tnt_mercurio.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
$soapClient = new SoapClient("http://ws.tntbrasil.com.br/servicos/CalculoFrete?wsdl");
$consulta = new stdClass();
$consulta->cdDivisaoCliente='1';
$consulta->cepDestino='22450000';
$consulta->cepOrigem='89806210';
$consulta->login='login aqui';
$consulta->nrIdentifClienteDest='99999999999';
$consulta->nrIdentifClienteRem='cnpj aqui';
$consulta->nrInscricaoEstadualDestinatario='ie aqui';
$consulta->nrInscricaoEstadualRemetente='';
$consulta->psReal='5.00';
$consulta->senha='';
$consulta->tpFrete='C';
$consulta->tpPessoaDestinatario='F';
$consulta->tpPessoaRemetente='J';
$consulta->tpServico='RNC';
$consulta->tpSituacaoTributariaDestinatario='NC';
$consulta->tpSituacaoTributariaRemetente='CO';
$consulta->vlMercadoria='999.00';
try {
$info = $soapClient->calculaFrete(array('in0'=>$consulta));
print_r($info);
} catch (SoapFault $fault) {
print_r($fault);
}
?>