0

I am facing an issue with Paypal IPN message in Magento 1.8.1. When I placed the order with Paypal the Order status still shows Pending even I have set the IPN notification URL to http://www.devdomain.com/paypal/ipn/. Also try to place the IPN script in my root folder but no success. :(

I am using Paypal Standard. When I see inside the Paypal it shows 500 error in IPN history page.

Please advise how I can resolve this issue.

  • What does the Magento and/or server logs say? – Barry Carlyon May 27 '15 at 7:49
  • I have checked the magento paypal log in postback_result it show 403: forbidden error. – Vick May 27 '15 at 12:13
0

Finally I found the solution after reviewing in deep. This was cause to due "USER Agent" HTTP Header in request. You can update this on Ipn.php file. Just replace the below line from this function on app/code/core/Mage/Paypal/Model/Ipn.php (Don't apply on core file. Add it on local dir)

protected function _postBack(Zend_Http_Client_Adapter_Interface $httpAdapter)

at line 143 (in magento 1.8.1)

$httpAdapter->write(Zend_Http_Client::POST, $this->_config->getPaypalUrl(), '1.1', array(
                'Connection: close',
            ), $sReq);

replace with

$httpAdapter->write(Zend_Http_Client::POST, $this->_config->getPaypalUrl(), '1.1', array(
                'Connection: Close', 'User-Agent: your_company_name'
                ), $sReq);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.