Reputation: 605
I referred all the previous stackoverflow answers regarding this. but I am not clear what to do with my case.
IPN was not sent, and the handshake was not verified. Please review your information.
This is the error I am getting when sending ipn message using ipn simulator..
I am using the script from
https://github.com/paypal/ipn-code-samples/blob/master/paypal_ipn.php
I am just checking this with sandbox account
and I am not using https site. I am using only http.
even I tried
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 contains https://www.symantec.com/content/dam/symantec/docs/other-resources/verisign-class-3-public-primary-certification-authority-g5-en.pem
even I changed the CURLOPT_SSL_VERIFYPEER to false but didn't work
I don't know what to do please help
update: I removed everything in the listener page and put just file_put_contents("ipntest.txt", var_export($_POST, true)); still the same error and ipntest.txt file is alse not created Thanks,
Upvotes: 1
Views: 5369
Reputation: 319
As of now (March 2017) IPN Simulator doesn't seem to work at all. Use Sandbox accounts to initiate normal payment cycle; it does work.
Upvotes: 6
Reputation: 3402
PayPal Sandbox is upgraded and only accept SSL connection with TLSv1.2 (TLS 1.1 and lower versions of SSL are not accepted). You would need to ensure your apacha / OpenSSL supports tlsv1.2, pls run the command on your terminal and verify:
$ openssl s_client -connect api-3t.sandbox.paypal.com:443
Typically upgrading your OpenSSL to 1.0.1 or higher would work.
Upvotes: 1
Reputation: 523
U Should Use te PayPal IPN Simulator. https://developer.paypal.com/developer/ipnSimulator/
The PayPal IPN is nothing u have to CURL.
PayPal sends a Basic $_POST to the defined Address. so u just have to use $_POST['payment_type']
Sometimes u Need to header('HTTP/1.1 200 OK');
.
In My Case the $_POST from a Test Looks like this.
$._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¬ify_version=2.1&custom=xyz123&invoice=abc1234&test_ipn=1&verify_sign=AnKUojs05l5xK--wKubHCkCuzwmCAxnK4WCLxW3c2aUgJNx4ufcY8RSh}
Upvotes: -1