Created
May 22, 2017 22:11
-
-
Save reginaldojunior/83b8cdaa8c82cf943d62d07556074594 to your computer and use it in GitHub Desktop.
example receiver post shipping pluggto
This file contains hidden or 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
<?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