0
我有一個貝寶形式,將有隱藏的變量,我可以改變使用螢火蟲編輯它的金額。如何避免這種情況之前發送此表格到貝寶我不存儲任何值在我的分貝。我應該將這些數據存儲在數據庫中,一旦從貝寶獲得成功值,我應該檢查當前金額是否等於發送金額項目ID。如何安全地發送貝寶形式的隱藏變量?
<form id="paypal_form_one_time" target="_top" class="paypal-form" method="post" action="https://www.sandbox.paypal.com/cgi-bin/webscr">
<input type="hidden" value="_xclick" name="cmd">
<input type="hidden" value="110.00" name="amount">
<input type="hidden" value="[email protected]" name="business">
<input type="hidden" value="12345" name="item_number">
<input type="hidden" value="Featured for 3 Months ($99)" name="item_name">
<input type="hidden" value="USD" name="currency_code">
<input type="hidden" value="1" name="no_note">
<input type="hidden" value="1" name="no_shipping">
<input type="hidden" value="1" name="rm">
<input type="hidden" value="feature_item_id=1&deal_item_id=0" name="custom">
<input type="hidden" value="http://localhost/xxxx/xxxx/paypal_success" name="return">
<input type="hidden" value="" name="user_email">
<input type="hidden" value="http://xxxx/xx/xxx/paypal_cancel" name="cancel_return">
<input type="hidden" value="http://xxx/xx/paxxypal_ipn" name="notify_url">
</form>
您可以將變量設置爲會話變量,只提交最少的字段,然後通過curl將數據提交給PayPal。 – RamRaider
使用php驗證表單字段,並使用SSL保護連接 – Andrew