0

so I've been building this project and the IPN worked perfectly for my Sandbox - but as soon as I changed the URL to live, I got this log message.

I tried using this as a solution but still receiving the error.

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close', 'User-Agent: company-name'));

The Message response I get is

<HTML>
<HEAD>
    <TITLE>Access Denied</TITLE>
</HEAD>
<BODY>
    <H1>Access Denied</H1>

    You don't have permission to access "https://www.paypal.com/cgi-bin/webscr" on this server.<P>
    Reference #18.........    
</BODY>
</HTML>

The IPN im using is this one :

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

Can anyone please help. Thanks

Anno
  • 85
  • 3
  • 15
  • Sounds like a malformed HTTP Header - Akamai will block requests with missing user agent in certain countries. Can you check what is being sent out in the HTTP request? See http://stackoverflow.com/questions/866946/how-can-i-see-the-request-headers-made-by-curl-when-sending-a-request-to-the-ser for a how-to – PayPal_Martin Feb 02 '15 at 14:11

1 Answers1

0

It seems that I made an mistake, instead of adding in the additional line :

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close', 'User-Agent: company-name'));

I had to acutally just add in :

, 'User-Agent: company-name'

in the line that already existed. It's working now.

Anno
  • 85
  • 3
  • 15