【问题标题】:How to secure paypals purchase forms如何保护贝宝购买表格
【发布时间】:2013-08-26 21:24:15
【问题描述】:

我正在尝试帮助有问题的人,您可以在其中捐赠一些积分,但您的源代码将允许您编辑 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>

【问题讨论】:

    标签: html forms paypal inject


    【解决方案1】:

    这样,不可能。我猜你想做什么,这不是你遵循的正确方式。

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

    阅读全文:

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

    【讨论】:

      【解决方案2】:

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

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

      【讨论】:

        猜你喜欢
        • 2011-05-11
        • 1970-01-01
        • 2016-03-17
        • 2016-11-21
        • 2015-11-03
        • 2012-04-07
        • 2011-11-06
        • 1970-01-01
        • 2013-10-17
        相关资源
        最近更新 更多