php - Paypal 按钮不工作 - 我们很抱歉错误

标签 php paypal payment-gateway paypal-sandbox paypal-ipn

我正在尝试将 PayPal 集成到我的网站中。我的要求是我想将计算机生成的金额传递给 PayPal 以支付该金额。 但是当我使用按钮付款时,我被带到网站进行付款,在那里我使用沙盒帐户登录并付款。但是当我付款时,我收到一条消息说

We’re sorry Things don’t appear to be working at the moment.

enter image description here 我从提出的类似问题中搜索了可能的问题,并实现了建议的修复方法,即在服务器中托管一个按钮并提供不同的参数,但没有成功。这是我正在使用的代码

    <form 
                action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
                <!-- Identify your business so that you can collect the payments. -->
                <input type="hidden" name="business" value="**********@gmail.com">
                <!-- Specify a Buy Now button. -->
                <input type="hidden" name="cmd" value="_xclick">
                <!-- Specify details about the item that buyers will purchase. -->
                <input type="hidden" name="item_name" value="Product1">
                <input type="hidden" name="item_number" value="1">
                <input type="hidden" name="amount" value="10.00">
                <input type="hidden" name="currency_code" value="USD">
                <input type="hidden" name="rm" value="2" />
                <!--in custom field add user id-->
                      <input type="hidden" name="custom" value="102">
                <!-- Specify URLs -->
                <input type='hidden' name='cancel_return' value='http://www.shreyash.tech'>
                <input type='hidden' name='return' value='http://www.google.co.in'>
                <input type="image" name="submit" border="0" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online">
                <img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
    </form>

我不知道我在这里做错了什么。

最佳答案

您的沙盒帐户似乎存在问题。请创建新的沙盒卖家和买家测试帐户,然后重试。 这是 link供您创建 PayPal 沙盒帐户引用。

关于php - Paypal 按钮不工作 - 我们很抱歉错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46661308/

相关文章:

php - 有没有办法限制下拉框的大小

html - PHP - DOM,从 html 中剥离表格

php - 如何映射 Doctrine 实体

Paypal 与网站整合

paypal - 如何制作 Paypal 按钮字段 'Required' ?

html - Paypal express check out 指定服装尺码

javascript - 将 JavaScript 变量的值设置为 PHP 变量

payment-gateway - BlueSnap 虚拟终端 - 设置产品候选 list

php - 如何在 redirecturl 中显示 Mollie 订单状态?

asp.net - dot net mvc5 Controller 中的异步函数造成死锁