Skip to content

Instantly share code, notes, and snippets.

@reginaldojunior
Created May 22, 2017 22:11
Show Gist options
  • Save reginaldojunior/83b8cdaa8c82cf943d62d07556074594 to your computer and use it in GitHub Desktop.
Save reginaldojunior/83b8cdaa8c82cf943d62d07556074594 to your computer and use it in GitHub Desktop.
example receiver post shipping pluggto
<?php
//receber post
$body = json_decode(file_get_contents('php://input'), true);
print_r($body);
// faz o tratamento com o body e a cotação de frete que deseja
$resposta = array(
array(
'method' => 'nome do metodo', //string
'company' => 'company', //string
'price' => 10.99, //float
'estimate' => 1 //integer
)
);
echo $resposta;
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment