未发送 IPN,并且未验证握手.请查看您的信息

  • 本文关键字:信息 验证 IPN php paypal
  • 更新时间 :
  • 英文 :


我参考了之前所有关于这个问题的stackoverflow答案。 但我不清楚如何处理我的案子。

IPN was not sent, and the handshake was not verified. Please review your information.

这是我在使用ipn模拟器发送ipn消息时遇到的错误。

我正在使用来自的脚本

https://github.com/paypal/ipn-code-samples/blob/master/paypal_ipn.php

我只是用沙盒帐户检查这个

而且我没有使用 https 网站。我只使用http。

即使我试过

             CURLOPT_URL => $url,
                    CURLOPT_POST => TRUE,
                    CURLOPT_POSTFIELDS => http_build_query(array('cmd' => '_notify-validate') + $ipn_post_data),
                    CURLOPT_RETURNTRANSFER => TRUE,
                    CURLOPT_HEADER => FALSE,
                    CURLOPT_SSL_VERIFYPEER => TRUE,
                    CURLOPT_CAINFO => 'cacert.pem',

cacert.pem 包含 https://www.symantec.com/content/dam/symantec/docs/other-resources/verisign-class-3-public-primary-certification-authority-g5-en.pem

即使我CURLOPT_SSL_VERIFYPEER更改为 false 但没有工作

我不知道该怎么办请帮忙

更新:我删除了侦听器页面中的所有内容,只输入了file_put_contents("ipntest.txt",var_export($_POST,true)); 仍然相同的错误和 ipntest.txt 文件未创建谢谢

截至目前(2017年3月),IPN模拟器似乎根本无法正常工作。使用沙盒账户启动正常支付周期;它确实有效。

PayPal沙

盒已升级,仅接受与TLSv1.2的SSL连接(不接受TLS 1.1和更低版本的SSL)。您需要确保您的apacha/OpenSSL支持tlsv1.2,请在终端上运行命令并验证:

$ openssl s_client -connect api-3t.sandbox.paypal.com:443 

通常,将OpenSSL升级到1.0.1或更高版本是可行的。

U 应该使用 te PayPal IPN 模拟器。https://developer.paypal.com/developer/ipnSimulator/

IPN PayPal不是你必须卷曲的。

PayPal向定义的地址发送基本 $_POST。 所以你只需要使用$_POST['payment_type']

有时你需要header('HTTP/1.1 200 OK');.

就我而言,测试的 _POST 美元如下所示。

$._POST:{payment_type=instant&payment_date=Mon+May+30+2016+08%3A47%3A06+GMT+0200+%28Mitteleurop%E4ische+Sommerzeit%29&payment_status=Completed&address_status=confirmed&payer_status=verified&first_name=Scriptkiddie&last_name=StackOverflow&payer_email=buyer%40paypalsandbox.com&payer_id=TESTBUYERID01&address_name=John+Smith&address_country=United+States&address_country_code=US&address_zip=95131&address_state=CA&address_city=San+Jose&address_street=123+any+street&business=seller%40paypalsandbox.com&receiver_email=seller%40paypalsandbox.com&receiver_id=seller%40paypalsandbox.com&residence_country=US&item_name=something&item_number=AK-1234&quantity=1&shipping=3.04&tax=2.02&mc_currency=USD&mc_fee=0.44&mc_gross=12.34&mc_gross_1=12.34&txn_type=web_accept&txn_id=136666829&notify_version=2.1&custom=xyz123&invoice=abc1234&test_ipn=1&verify_sign=AnKUojs05l5xK--wKubHCkCuzwmCAxnK4WCLxW3c2aUgJNx4ufcY8RSh}

最新更新