Foros del Web » Programando para Internet » PHP »

problema mercadopago Checkout php

Estas en el tema de problema mercadopago Checkout php en el foro de PHP en Foros del Web. hola, queria saber si alguine configuró la la cuenta Checkout de mercadopago php. bajé la sdk php con los ides del usuario. Cree una pagina ...
  #1 (permalink)  
Antiguo 07/10/2015, 20:53
 
Fecha de Ingreso: octubre-2015
Mensajes: 1
Antigüedad: 8 años, 6 meses
Puntos: 0
Exclamación problema mercadopago Checkout php

hola, queria saber si alguine configuró la la cuenta Checkout de mercadopago php.
bajé la sdk php con los ides del usuario.
Cree una pagina para el boton y en el innit point puse el link donde copie el array que te dan de ejemlo. carga la ventana pero no conecta con mercado.
aqui le paso los codigos y saber si falta hacer algun paso.

/* boton *//

<!DOCTYPE html>
<html>
<head>
<title>boton</title>
</head>
<body>

<!-- Aquí debes insertar la URL que corresponde al "init_point" -->
<a href="mercadoarrray.php" name="MP-Checkout" class="lightblue-M-Ov-ArOn" mp-mode="modal window">pagando</a>

<!-- Pega este código antes de cerrar la etiqueta </body> -->
<script type="text/javascript">
(function(){function $MPC_load(){window.$MPC_loaded !== true && (function(){var s = document.createElement("script");s.type = "text/javascript";s.async = true;
s.src = document.location.protocol+"//resources.mlstatic.com/mptools/render.js";
var x = document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s, x);window.$MPC_loaded = true;})();}
window.$MPC_loaded !== true ? (window.attachEvent ? window.attachEvent('onload', $MPC_load) : window.addEventListener('load', $MPC_load, false)) : null;})();
</script>
</body>
</html>

/*y mercado array borre las claves*/

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

$mp = new MP('xxxxxxxxxxxxxxx', 'xxxxxxxxxxxxx');

$preference_data = array(
"items" => array(
array(
"title" => "Multicolor kite",
"quantity" => 1,
"currency_id" => "ARS", // Available currencies at: https://api.mercadopago.com/currencies
"unit_price" => 10.00
)
)
);

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

<!DOCTYPE html>
<html>
<head>
<title>Pay</title>
</head>
<body>
<a href="<?php echo $preference['response']['init_point']; ?>">Pay</a>
</body>
</html>

Etiquetas: mercadopago
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta

SíEste tema le ha gustado a 1 personas




La zona horaria es GMT -6. Ahora son las 13:43.