Good Day!! I have the next code to put a Buy Now button and send my items dynamically to PayPal, but when I click on the Buy Now button, the button doesn't send the info to the paypal page, it stays in the same page and I don't know what I'm doing wrong.
<form name="cart" action="http://ift.tt/xpRUtH" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="mypaypalaccount">
<?
foreach($_SESSION['articulosEnCarrito'] as $key => $v) {
$clave=$_SESSION['articulosEnCarrito'][$key]['prod'];
$descripcion=$_SESSION['articulosEnCarrito'][$key]['descr'];
$precio=$_SESSION['articulosEnCarrito'][$key]['precio'];
$cantidad=$_SESSION['articulosEnCarrito'][$key]['cant'];
?>
<input type="hidden" name="item_number_<? $i?>" value="<?php $clave ?>" />
<input type="hidden" name="item_name_<? $i?>" value="<?php $descripcion ?>" />
<input type="hidden" name="quantity_<? $i?>" value="<?php $cantidad ?>">
<input type="hidden" name="amount_<? $i?>" value="<?php $precio ?>" />
<input type="hidden" name="currency_code_<? $i?>" value="MXN" />
<?
$i++;
} // foreach ?>
<input type="hidden" name="return" value="http://ift.tt/1fyCwhJ" />
<input type="image" src="http://ift.tt/1eaLL1U" border="0" name="submit" alt="PayPal, la forma más segura y rápida de pagar en línea." style="width: 150px; height: 50px; float:right;">
<img alt="" border="0" src="http://ift.tt/qzX37J" width="1" height="1" />
</form>
Aucun commentaire:
Enregistrer un commentaire