Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/01/2015, 11:30
BrunoSebastianAlod
 
Fecha de Ingreso: abril-2013
Mensajes: 32
Antigüedad: 11 años, 7 meses
Puntos: 0
Respuesta: [Consulta] Variable no funciona

Hola.

El código completo sería esta

Cita:
<?php
require_once "../../../lib/mercadopago.php";
$refe = 'hola';
echo $refe;

$mp = new MP('xxx', 'yyy');

$preference_data = array(
"items" => array(
array(
"id" => "1",
"title" => "Title of what you are paying for",
"currency_id" => "USD",
"picture_url" =>"https://www.mercadopago.com/org-img/MP3/home/logomp3.gif",
"description" => "BB",
"category_id" => "AA",
"quantity" => 1,
"unit_price" => 10.2
)
),
"payer" => array(
"payer_name" => "user-name",
"payer_surname" => "user-surname",
"email" => "[email protected]",
"date_created" => "2014-07-28T09:50:37.521-04:00",
"phone" => array(
"area_code" => "11",
"number" => "4444-4444"
),
"identification" => array(
"type" => "DNI",
"number" => "12345678"
),
"address" => array(
"street_name" => "Street",
"street_number" => 123,
"zip_code" => "1430"
)
),

"notification_url" => "http://b9000046.ferozo.com/ml/examples/checkout-buttons/basic-preference/receive-ipn.php",
"external_reference" => $refe,
"expires" => false,
"expiration_date_from" => null,
"expiration_date_to" => null
);

$preference = $mp->create_preference($preference_data);



?>

<!doctype html>
<html>
<head>
<title>MercadoPago SDK - Create Preference and Show Checkout Example</title>
</head>
<body>
<a href="<?php echo $preference["response"]["init_point"]; ?>" name="MP-Checkout" class="orange-ar-m-sq-arall">Pay</a>
<script type="text/javascript" src="http://mp-tools.mlstatic.com/buttons/render.js"></script>


</body>
</html>