Php 贝宝处理订单的安全方式

Php 贝宝处理订单的安全方式,php,paypal,Php,Paypal,我目前正在开发一个网站,使用贝宝进行订单处理。。 这是我目前使用的html表单,用于测试目的 <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <select name="amount"> <option value="3.99">6 Months ($3.99)</option> <option value="5.99">12 Months ($5

我目前正在开发一个网站,使用贝宝进行订单处理。。 这是我目前使用的html表单,用于测试目的

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

<select name="amount">
<option value="3.99">6 Months ($3.99)</option>
<option value="5.99">12 Months ($5.99)</option>

</select>
<br>
<input name="currency_code" type="hidden" value="USD">
<input name="shipping" type="hidden" value="0.00">
<input name="tax" type="hidden" value="0.00">
<input name="return" type="hidden" value="urlOnValidPayment">
<input name="cancel_return" type="hidden" value="UrlOnCancelPayment">
<input name="notify_url" type="hidden" value="URLForValidationPayement">
<input name="cmd" type="hidden" value="_xclick">
<input name="business" type="hidden" value="your e-mail">
<input name="item_name" type="hidden" value="name of the object">
<input name="no_note" type="hidden" value="1">
<input type="hidden" name="no_shipping" value="1">
<input name="lc" type="hidden" value="EN">
<input name="bn" type="hidden" value="PP-BuyNowBF">
<input name="custom" type="hidden" value="custom data">
<input type="image" src="https://www.paypalobjects.com/en_US/CH/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
</form>

6个月(3.99美元)
12个月(5.99美元)

但是,我注意到,这种方法对于订购目的是不安全的。它只能用于捐赠目的。因为,用户可以返回到“notify_url”字段中的url,而无需付费。废话。。
我说得对吗?或者有什么方法可以使其安全?

您可以在IPN脚本中核对项目金额,但在我看来,这可能比它的价值更麻烦。由于您已经在使用PHP,我建议您使用而不是标准的付款按钮。这使一切更加安全,并允许您完全集成而不受任何限制


如果你愿意的话,你可以看看我的。这将使API调用对您来说非常简单。具体来说,您将看到,并且。

用户访问URL时出现了什么问题?你不能以为他们仅仅因为访问了那个页面就付钱了。您需要确认付款通过(例如IPN通知)yuo IPN是答案,确保您也核对了金额谢谢。。需要阅读IPN文档:)@Dagon可能是更好的选择。