我正在实施贝宝付款到我的网站。但是有一些隐藏的表单元素,例如价格和我们可以轻松操作的这些元素。我怎样才能将它们完美地隐藏在PHP中,例如没有人可以操纵这个值?贝宝实施:隐藏元素到PHP
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="item_name" value="Item Example 1">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="amount" value="5.95">
<input type="hidden" name="currency_code" value="USD">
<input type='hidden' name='cancel_return' value='http://example.com/cancel.php'>
<input type='hidden' name='return' value='http://example.com/success.php'>
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>
隐藏要素item_name
,item_number
,amount
和currency_code
我不希望看到他们。有没有机会用PHP或以某种方式隐藏它们?
非常感谢!
将会话中的信息保存在您的服务器上,并在价值发生变化时取消订单,或者使用HMAC签署订单并将其传递给PayPal,并在通过PayPal后将其检查 –