1

我正在沙盒中测试 IPN。在我的网站上,我记录了 Paypal 和我的网站之间的通信

Start validations:_notify-validate,16.94,Eligible,confirmed,SVWAAUVZX2S4Y,0.00,1 Main    St,13:57:50 May 07, 2012 PDT,Completed,windows-1252,95131,Test,0.84,US,Test   User,3.4,,verified,demarc_1336421374_biz@gmail.com,United States,San  Jose,1,As4zhnwQeMSnsOdh0NBxc2GkfRrEAd8OPZnnd3EWRDz38L81PzX-6vI- ,demarc_1321350258_per@gmail.com,6FT25620DT6366410,instant,User,CA,demarc_1336421374_biz@gmail .com,,6SHJZ2PT5YMLS,web_accept,test item,EUR,,US,1,0.00,test item,,0.00,de0561482901
2012-05-07 22:52:47 Paypal: ResponseVERIFIED
2012-05-07 22:52:47 Paypal: 1
2012-05-07 22:52:47 Paypal: Processing Trasaction: 4fa8361f-7574-444f-b821-5e660a00000f
2012-05-07 22:52:47 Paypal: 4fa8361f-7574-444f-b821-5e660a00000f

好像没问题吧?但是,如果我使用企业帐户登录 Sandbox,在 IPN 历史记录中,我看到 Paypal 一直在尝试发送 IPN。在我的网站上,我将事务记录到数据库中,我看到很多记录(如果响应得到验证,我会存储这些记录)。这怎么可能?我用 cakephp 函数 isValid($data){ 发回 Paypal

$data['cmd'] = '_notify-validate';
$newData['cmd'] = '_notify-validate';
foreach ($data AS $key => $val) {
$newData[$key] = $val;
}
    $this->log("Start validations:".join(",",$newData), 'paypal');
    $data = array_map(array('PaypalIpnSource', 'clearSlash'), $newData);

    if (isset($data['test_ipn'])) {
        $server = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
    } else {
        $server = 'https://www.paypal.com/cgi-bin/webscr';
    }

    $response = $this->Http->post($server, $newData);
      $this->log("Response".$response, 'paypal');

    if ($response == "VERIFIED") {
        return true;
    }

    if (!$response) {
        $this->log('HTTP Error in PaypalIpnSource::isValid while posting back to PayPal', 'paypal');
    }

    return false;
}

}

我不认为这是 cakephp 或其他问题。我在沙盒业务帐户中将欧元设置为货币。贝宝提交表格中的货币价值也是欧元。经过几天的谷歌搜索,任何帮助表示赞赏。

4

1 回答 1

0

您的 IPN 端点必须使用 HTTP 状态代码 200 回复 PayPal 的通知。否则状态将保持“重试”。

于 2014-10-25T13:26:44.070 回答