![](/img/trans.png)
[英]problem with encrypting dynamic “add to cart” paypal button with php
[英]php add to cart paypal button problem - problem with my amount
我有一個Paypal沙箱“添加到購物車”,如果用戶將數據庫中的特定產品添加到帳戶中,則應該根據數據庫中的產品顯示該產品的價格。
說我有這兩種產品;
產品:1件:帽子價格:£5.00
產品編號:2產品:襪子價格:3.00英鎊
但是,當我將這些產品添加到沙盒中的購物車中時,它說如果不是,則為0.50英鎊。 這是我的代碼;
<form target="paypal" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="7UCL9YCYYXL3J">
<input type="hidden" name="item_name" value="<?php echo $row['product']; ?>">
<input type="hidden" name="item_number" value="<?php echo $row['prodID']; ?>">
<input type="hidden" name="amount" value="<?php echo $row['price']; ?>">
<input type="hidden" name="currency_code" value="GBP">
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
看來這有問題(我不知道如何處理_s-xclick:
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="7UCL9YCYYXL3J">
相反,它沒有:
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="youremail@yahoo.gr">
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.