IPN验证无法与codeigniter中的paypal库一起使用

时间:2012-07-21 13:21:03

标签: php codeigniter

我正在尝试使用我在此处找到的paypal库表单:http://www.amplio.ch/blog/web-development/paypal-integration-to-codeigniter/

但是,我在验证IPN时遇到了问题。

我检查了日志文件,这就是它所说的:

[07/16/2012 8:01 AM] - FAIL: IPN Validation Failed.
IPN POST Vars from Paypal:
mc_gross=2.00, protection_eligibility=Ineligible, address_status=confirmed, payer_id=JPL6YA8KDP9XU, tax=0.00, address_street=1 Main St, payment_date=06:01:05 Jul 16, 2012 PDT, payment_status=Pending, charset=windows-1252, address_zip=95131, first_name=dhananjay, mc_fee=0.38, address_country_code=US, address_name=dhananjay singh, notify_version=3.5, custom=1040, payer_status=verified, business=dsingh948@gmail.com, address_country=United States, address_city=San Jose, quantity=1, verify_sign=AuX-fMg1xrQJhvjWRGDSXwAJ82uAAyxc63TOdI-Sp.-aqOD73m46FsWB, payer_email=dsingh_1342159008_per@gmail.com, txn_id=8NB38255AB165691V, payment_type=instant, last_name=singh, address_state=CA, receiver_email=dsingh948@gmail.com, payment_fee=0.38, receiver_id=ZXFXNX7UFQTVE, pending_reason=paymentreview, txn_type=web_accept, item_name=Yearly paid membership, mc_currency=USD, item_number=, residence_country=US, test_ipn=1, handling_amount=0.00, transaction_subject=1040, payment_gross=2.00, shipping=0.00, ipn_track_id=5105e9658341, 
IPN Response from Paypal Server:
 HTTP/1.1 200 OK
Date: Mon, 16 Jul 2012 13:01:11 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Set-Cookie: cwrClyrK4LoCV1fydGbAxiNL6iG=KQ_8n-WRpV21ve142cfDNKvEQA6NJ90ucEOHF05_qrbnLSc8ynOmDwZAXTO8FlxqSbzayxkMb3zrevSnFFbwlq4qZROyrZvO6f6x29Dony5Dh3Lfb5H0f1nxSkRD7JxGGil_rG%7cGNnGXKAoBJtGpTG-6lg3wp3OYY-0PoJdIp1rq-PTwF7OYIRTstev0ZpXeF_fQ9EJvIn0Bm%7cvG4vpKncFqJFU2ufHoMB3MbUDvkd_e77s-MQcMl4TDlZ3QZBq5E0W1tOteagTNxvm1BDsm%7c1342443671; domain=.paypal.com; path=/; HttpOnly
Set-Cookie: cookie_check=yes; expires=Thu, 14-Jul-2022 13:01:11 GMT; domain=.paypal.com; path=/; HttpOnly
Set-Cookie: navcmd=_notify-validate; domain=.paypal.com; path=/; HttpOnly
Set-Cookie: navlns=0.0; expires=Sun, 11-Jul-2032 13:01:11 GMT; domain=.paypal.com; path=/; HttpOnly
Vary: Accept-Encoding
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

7
INVALID
0

有人知道问题是什么吗?

1 个答案:

答案 0 :(得分:0)

我已经遇到过这个问题,这是解决方案 在你的paypal_class.php(第186行)中,更改:

$fp = fsockopen($url_parsed[host],"80",$err_num,$err_str,30);

$fp = fsockopen('ssl://www.paypal.com', '443', $err_num, $err_str, 30);

来源:https://www.paypal-community.com/t5/Merchant-services-Archive/I-m-not-receiving-a-response-from-Paypal-s-IPN-Sandbox/td-p/387696#