Skip to content

Instantly share code, notes, and snippets.

@JuaniVeltri
Last active March 29, 2019 20:22
Show Gist options
  • Save JuaniVeltri/ed555ecd4a9c1bc30b0961239e45ab4e to your computer and use it in GitHub Desktop.
Save JuaniVeltri/ed555ecd4a9c1bc30b0961239e45ab4e to your computer and use it in GitHub Desktop.
Ejemplo de uso de calculador de shipping usando SDK de PHP de MercadoPago
<?php
require_once 'vendor/autoload.php';
MercadoPago\SDK::setClientId("CLIENT_ID");
MercadoPago\SDK::setClientSecret("CLIENT_SECRET");
$envio = MercadoPago\SDK::get("/shipping_options", array(
"url_query" => array(
"dimensions" => "30x30x30,500",
"zip_code" => "5700",
"item_price"=>"100.58",
"free_method" => "73328" // optional
)
));
var_dump($envio);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment