1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| <?php
$nbArticles=count($_SESSION['panier']['idProduit']);
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
for ($i=0 ;$i < $nbArticles ; $i++)
{
$index = $i +1;
<input type="text" name="item_name_'.$index.'" value="'.htmlspecialchars($_SESSION['panier']['libelleProduit'][$i]).'">
<input type="text" name="amount_'. $index . '" value="'.htmlspecialchars($_SESSION['panier']['prixProduit'][$i]).'">
<input type="text" name="quantity_'. $index .'" value="'.htmlspecialchars($_SESSION['panier']['qteProduit'][$i]).'">
}
<input name="currency_code" type="text" value="EUR" />
<input name="shipping" type="text" value="0.00" />
<input name="tax" type="text" value="0.00" />
<input name="return" type="text" value="http://votredomaine/paiementValide.php" />
<input name="cancel_return" type="text" value="http://votredomaine/paiementAnnule.php" />
<input name="notify_url" type="text" value="http://votredomaine/validationPaiement.php" />
<input name="cmd" type="text" value="_xclick" />
<input name="business" type="text" value="my.bab_1324302424_biz@gmail.com" />
<input name="no_note" type="text" value="1" />
<input name="lc" type="text" value="FR" />
<input name="bn" type="text" value="PP-BuyNowBF" />
<input name="custom" type="text" value="ID_ACHETEUR" />
<input alt="Effectuez vos paiements via PayPal : une solution rapide, gratuite et sécurisée" name="submit" src="https://www.paypal.com/fr_FR/FR/i/btn/btn_buynow_LG.gif" type="image" /><img src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" border="0" alt="" width="1" height="1" />
</form>
?> |
Partager