0
我試圖用以下代碼上傳一個購物車,但是當用戶點擊「立即購買」按鈕時,而不是顯示PayPal的訂單摘要頁面,用戶可以登錄付款,我得到一個錯誤說Your shopping cart is empty.
PayPal使用一個按鈕簡單上傳購物車 - 爲什麼購物車是空的?
這是我的代碼,它有什麼問題?
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<a href='cart.php?type=current' class='buttonlink previous'>Edit Order</a> <a href='checkout4_confirm.php' class='buttonlink next'>Submit Order</a>
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="hosted_button_id" value="JRECLRTYAJDKY">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="item_name_1" value="<?php echo $order_number; ?>">
<input type="hidden" name="item_number_1" value="1">
<input type="hidden" name="quantity_1" value="1">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynow_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
但它不會安全,會嗎? – user961627 2013-03-07 17:09:40
這取決於你對安全的描述。對於客戶的信用卡信息,它仍然是安全的。就某人可以右鍵單擊該頁面並查看源代碼而言,這並不安全。保存它,然後修改金額並處理較少金額的付款。使用非託管按鈕的商家只需讓他們的系統執行IPN檢查並退還不完全金額的交易。您也可以隨時創建託管按鈕,並在當時傳遞您的信息,而不是在之後進行修改。 – 2013-03-07 18:11:52