English 中文(简体)
php 添加到手推车的付费按钮问题 - 与我的数额有问题
原标题:php add to cart paypal button problem - problem with my amount

我有一个付费的沙箱“加到Cart” 如果用户从数据库中将特定产品添加到一个账户, 它应该根据数据库中的内容来显示该产品的价格。

说我有两个产品;

prodID: 1 product: Hat price: £5.00

prodID: 2 product: socks price: £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-x单击:

<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="[email protected]">




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签