<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" name="pay" class="pay" id="pay" method="POST" onsubmit="return true">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="MY EMAIL">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" id="item_name" name="item_name" value="test">
<input type="hidden" id="amount" name="amount" value="00">
<input type="hidden" name="currency_code" value="SGD">
<input type="hidden" name="rm" value="1">
<!-- Specify URLs -->
<input type='hidden' name='cancel_return' value='<?=base_url('/order/cancel/')?>'>
<input type='hidden' id="return" name='return' value='<?=base_url('/order/success/')?>'>
<input type='hidden' id="notify_url" name='notify_url' value='<?=base_url('/order/ipn/')?>'>
这是我的表格。我通过AJAX传递价值
{
var quantity = $(this).val();
var amount = $('#amount');
var item_name = $('#item_name');
var email = '<?=$this->session->userdata('email').'@insead.edu'?>';
if(quantity == 'one') {
amount.val('23.54');
item_name.val(email+' & 1 Box');
return true;
}
else if(quantity == 'two') {
amount.val('34.24');
item_name.val(email + ' & 2 Box');
}
else {
amount.val('00');
item_name.val(email);
return true;
}
它直到今天都像魅力一样。我没有修改任何东西。而我在LAMPP上启动我的localhost突然无法用PayPal处理。我发现如果
<input type="hidden" id="amount" name="amount" value="00">
值设置为1或更多将不起作用。如果00将重定向到paypal输入总金额。刚刚发生,我不知道为什么。请提前帮助,谢谢。
答案 0 :(得分:0)
现在有效。问题来自PayPal沙箱。需要一些时间才能恢复稳定。