php - PayPal hitting notification URL repeatedly -
i have made payment through paypal adaptive payment , succecced
then send validation request , gotted status=verified
here code :
function process_new() { $req = 'cmd=_notify-validate&'.file_get_contents("php://input"); $ipnmsg=$this->decodepaypalipn($req); $ch = curl_init('https://www.sandbox.paypal.com/cgi-bin/webscr'); curl_setopt($ch, curlopt_http_version, curl_http_version_1_1); curl_setopt($ch, curlopt_post, 1); curl_setopt($ch, curlopt_returntransfer,1); curl_setopt($ch, curlopt_postfields, $req); curl_setopt($ch, curlopt_ssl_verifypeer, 1); curl_setopt($ch, curlopt_ssl_verifyhost, 2); curl_setopt($ch, curlopt_forbid_reuse, 1); curl_setopt($ch, curlopt_httpheader, array('connection: close')); $res=curl_exec($ch); curl_close($ch); //if ($this->instantpaymentnotification->is_valid($req)) if($res=='verified') // got verified here { $txnids=array(); $notifications = $this->instantpaymentnotification->buildassociationsfromipn_new($ipnmsg); foreach($notifications $notification){ $this->ipnnotification->create(); $this->ipnnotification->save($notification); $txnids[]=$this->ipnnotification->id; } //$this->instantpaymentnotificationnew->saveall($notification); $this->__processtransactionnew($txnids); } //$this->redirect('/'); }
unable find reason why notify_url keep hitting.
if more information needed post them ...
this ipn history :
`$code = curl_getinfo($curl, curlinfo_http_code);`
it return 200 still paypal shows http status code : 500
and notification url :http://example.com/instant_payment_notifications/process_new doesn't return http status code : 500
thanks.
look closely @ paypal screenshot: your server returning http code 500 on requests, meaning paypal interprets bad thing , http transaction didn't complete , try again until receives 200 ok.
check configuration of server. did make changes server's configuration? if craft own post endpoint url, return 500 status code you? has been down maintenance time when these requests put in? set api monitoring ensure these 500 errors aren't being thrown often.
Comments
Post a Comment