Ver Mensaje Individual
  #16 (permalink)  
Antiguo 20/06/2016, 03:57
Avatar de jors_11
jors_11
 
Fecha de Ingreso: marzo-2011
Ubicación: Granollers
Mensajes: 79
Antigüedad: 13 años, 1 mes
Puntos: 2
Respuesta: Problemas al introducir gastos de envío en paypal

Holaaaa!!! Pues no lo entiendo, me podriais mostrar un ejemplo de como lo puedo hacer?

Si quito el shipping del for no funciona;

Código PHP:
Ver original
  1. <form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="formulario">
  2.                     <input type="hidden" name="cmd" value="_cart">
  3.                     <input type="hidden" name="upload" value="1">
  4.                     <input type="hidden" name="business" value="[email protected]">
  5.                     <input type="hidden" name="currency_code" value="EUR"> 
  6.                     <?php
  7.                         for($i=0;$i<count($datos);$i++){
  8.                     ?>
  9.                         <input type="hidden" name="item_name_<?php echo $i+1;?>" value="<?php echo $datos[$i]['Nombre'];?>">
  10.                         <input type="hidden" name="amount_<?php echo $i+1;?>" value="<?php echo $datos[$i]['Precio'];?>">
  11.                         <input  type="hidden" name="quantity_<?php echo $i+1;?>" value="<?php echo $datos[$i]['Cantidad'];?>">  
  12.                         <?php
  13.                         }
  14.                     ?>
  15.                     <input type="hidden" name="shipping_<?php echo $i+1;?>" value="<?php echo $total2;?>"> 
  16.                 <center>
  17.                 <input type="submit" value="Pago mediante PayPal" class="aceptar" style="width:330px">
  18.                 </center>
  19.             </form>