如何确保paypals购买表格

时间:2013-08-26 21:24:15

标签: html forms paypal inject

我正在尝试帮助有问题的人,在那里你可以捐赠一些积分,但是源代码将允许你编辑paypal按钮的值。 例如,我选择了5分,这应该花费5美元,但是当我编辑源代码时,我可以看到整个paypal形式的值,并编辑值。 那么如何保护表单以便无法编辑?

以下是代码:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="at" value="nBWAy2wwJn1O1LdoLcMn8AOdPxBBUxhnZfqFvAlGQq1oDm0czxn5FBcpgIW">
<input type="hidden" name="business" value="admin@worldofthegods.com">
<input type="hidden" name="item_name" value="DP|1|452160">
<input type="hidden" name="amount" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://www.worldofthegods.com/donate.php?action=done">
<input type="hidden" name="cancel_return" value="http://www.worldofthegods.com/donate.php?action=cancel">
<input type="hidden" name="notify_url" value="http://www.worldofthegods.com/ipn_donator.php">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="tax" value="0">
<input type="image" src="http://worldofthegods.com/images/PaypalButton.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>

2 个答案:

答案 0 :(得分:0)

通过这种方式,这是不可能的。我想你想做什么,这不是你所遵循的正确方式。

您需要验证每笔付款并确保其有效并以正确的金额付款。 Paypal IPN 是解决方案,您需要一些服务器端编程。

了解更多:

  1. Paypal API Question - Can I use Return Url to verify payment
  2. How to verify successful payment of paypal

答案 1 :(得分:0)

我建议使用Express Checkout之类的东西,它允许您在API调用中发送交易详细信息,而不是将HTML代码显示给买方。

但是,除此之外,您的下一个最佳选择是使用加密网站付款。 https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/encryptedwebpayments/#id08A3I0P017Q