Ver Mensaje Individual
  #6 (permalink)  
Antiguo 16/08/2013, 13:40
TEXT
 
Fecha de Ingreso: agosto-2013
Ubicación: Puebla
Mensajes: 6
Antigüedad: 10 años, 8 meses
Puntos: 0
Respuesta: mercadopago y php

HABLANDO DEL TEMA, NECESITO SABER COMO INTEGRAR MI SDK DE MERCADOPAGO PARA PODER OBTENER VENTAS ONLINE.

SIGO LAS REGLAS SIN EMBARGO NO ME LIGA A NADA, INCLUSIVE ME GENERA ERRORES EL CODIGO PHP.

CODIGO:

Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>

<body>
<?php
require_once ('mercadopago.php');

$mp = new MP('xxxx', 'xxxxx');

$preference_data = array(
    "items" => array(
       array(
           "title" => "Barrilete multicolor",
           "quantity" => 1,
           "currency_id" => "ARS",
           "unit_price" => 10.00
       )
    )
);

$preference = $mp->create_preference ($preference_data);
?>
   <a href="<?php echo $preference['response']['init_point']; ?>" name="MP-Checkout" class="blue-rn-m">Pagar</a>
   
   
    <script type="text/javascript" src="https://www.mercadopago.com/org-img/jsapi/mptools/buttons/render.js"></script>
</body>
</html> 

O SI NO SERIA CASO DE SEPARAR EL PHP DE MI HTML