php - Paypal 沙盒 IPN "Email does not match seller"

标签 php codeigniter paypal paypal-ipn

我正在尝试使用 paypal 沙盒创建一个 paypal 订阅按钮。我已经创建了开发帐户,创建了沙盒业务和测试帐户。登录到我的商业测试帐户,转到商家服务 -> 我保存的按钮。

找到订阅按钮并复制代码。

我已将表格上传到我的 codeigniter Controller :http://422clients.com/ftg/paypal/test

我正在为 codeigniter 使用这个 paypal IPN 库:https://github.com/orderly/codeigniter-paypal-ipn

我现在使用未修改的 Controller 代码来处理 IPN 响应,因为它会将它写入数据库以供测试:

function ipn()
    {
        $this->load->library('PayPal_IPN'); // Load the library

        // Try to get the IPN data.
        if ($this->paypal_ipn->validateIPN())
        {
            // Succeeded, now let's extract the order
            $this->paypal_ipn->extractOrder();

            // And we save the order now (persist and extract are separate because you might only want to persist the order in certain circumstances).
            $this->paypal_ipn->saveOrder();

            // Now let's check what the payment status is and act accordingly
            if ($this->paypal_ipn->orderStatus == PayPal_IPN::PAID)
            {
                //Enable database subscription...
            }
        }
        else // Just redirect to the root URL
        {
            $this->load->helper('url');
            redirect('/', 'refresh');
        }
    }

我的问题是,当我单击网站上的按钮并使用我的沙盒测试帐户付款时,一切看起来都很好并且付款成功,但是当我查看我的数据库时,它显示:状态:错误。

原因字段说:电子邮件 business_test@422studios.com 与卖家不匹配

business_test@422studios.com 是我从中生成按钮的沙盒帐户。

我完全迷失在这里。感谢您的帮助。

最佳答案

在你的配置文件中,确保你有这个:

$config['paypal_ipn_sandbox_settings'] = array(
    'email' => 'business_test@422studios.com',
    'url' => 'https://www.sandbox.paypal.com/cgi-bin/webscr',
    'debug' => TRUE
);

并且您在表单中传递此值:

<input type="hidden" name="business" value="business_test@422studios.com">

关于php - Paypal 沙盒 IPN "Email does not match seller",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20406844/

相关文章:

具有多个查询的 php 函数 - 内部连接复制结果?

php - 新手和 PHP 框架

php - 从 codeigniter Controller 中的数组中删除一个索引

php - fatal error : Class 'PPXmlMessage' not found . 是什么?

php - 当您只插入几行时,MySQL 中的单个多个 INSERT 是否会在速度上产生很大差异?

javascript - 当显示的内容在数据库中具有 NULL 值时隐藏 DIV

asp.net - PayPal IPN 缺失字段

php - 错误 - 网关报告交易成功,但响应来自有效 IP 列表中未指定的 IP :

php - 为什么在图像和 css 文件之后查询字符串?

php - php codeigniter中的电话号码验证