dougong5817 2011-11-21 00:19
浏览 17

PayPal购物车按钮标记错误?

I'm getting this error message when testing my Add to Cart functionality using PayPal.

PayPal is very misleading with what fields and values I should be using. For example it says the cmd field should have _cart as value if the button is an Add to Cart, but I've found a working example using -s_xclick (which doesn't work for me).

Here is my markup:

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                                <!-- Specify an Add to Cart button. -->
                                <input type="hidden" name="cmd" value="_cart">
                                <input type="hidden" name="add" value="1">
                                <!-- Specify details about the item that buyers will purchase. -->
                                <input type="hidden" name="item_name" value="Product Two">
                                <input type="hidden" name="currency_code" value="GBP">
                                <input type="hidden" name="business" value="HY3MQABS97HT">

                                <span>£200</span><input type="hidden" name="amount" value="200">                                    <!-- <input type="image" name="submit" border="0"src="https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif"alt="PayPal - The safer, easier way to pay online"> -->
                                <input type="image" name="submit" border="0" src="http://www.karenrothwell.com/wp-content/themes/twentyten/images/addToBasketSmall.png" alt="PayPal - The safer, easier way to pay online">
                            </form>

What am I missing that would cause it not work? All seems in order to me!

  • 写回答

2条回答 默认 最新

  • douziqian2871 2011-11-21 00:27
    关注

    The business 'HY3MQABS97HT' is invalid. Is it perhaps for a Sandbox account? Then you'll need to change https://www.paypal.com/cgi-bin/webscr to https://www.sandbox.paypal.com/cgi-bin/webscr

    Note: The difference between _cart and _s-xclick is that _cart is used for unencrypted buttons, and _s-xclick is used for 'hosted' buttons (details stored with PayPal).

    评论

报告相同问题?

悬赏问题

  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行