Php 我能';不要将商品信息发送到Paypal
你好!!我有下一个代码来放置Buy Now按钮并将我的项目动态发送到PayPal,但是当我单击Buy Now按钮时,该按钮不会将信息发送到PayPal页面,它停留在同一页面上,我不知道我做错了什么Php 我能';不要将商品信息发送到Paypal,php,web,paypal,payment,Php,Web,Paypal,Payment,你好!!我有下一个代码来放置Buy Now按钮并将我的项目动态发送到PayPal,但是当我单击Buy Now按钮时,该按钮不会将信息发送到PayPal页面,它停留在同一页面上,我不知道我做错了什么 <form name="cart" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value=
<form name="cart" action="https://www.sandbox.paypal.com/cgi-bin/webscr" 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://www.gpelectromecanica.com.mx/procesar_pedido.php" />
<input type="image" src="https://www.paypalobjects.com/es_XC/MX/i/btn/btn_buynowCC_LG.gif" 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="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
</form>
您是否有任何JavaScript可能正在拦截表单操作?实际上,您缺少a是的,我有一些JavaScript,但我如何知道哪个JavaScript正在拦截?没关系,我的答案是错误的,所以我删除了它。我从未使用过
,也不知道它与我的建议(应该提交表单)是等价的。我还看到您正在遵循中建议的代码。在本页上:“设置单个事务的返回URL”一节提出了一些有趣的问题。您是否在PayPal中启用了“自动退货”?显然,你可以让他们在提交购物车后将用户返回到你网站上的特定页面(就像你正在尝试的那样)。您还可以根据每笔交易设置此设置:
如果PayPal没有重定向您,我认为您应该调查此设置。