cancel
Showing results for 
Search instead for 
Did you mean: 

Who Me Too'd this solution

Solved

filipporonco
Contributor
Contributor

Hi @angelleye, thanks a lot for your time.
We've finally figured out what was wrong.

 

Trying the complete debugging of the call to the svcs endpoint we've discovered that since few days (first time from 2013), we started getting an odd response from the paypal server to our SOAP request as: 

{"faultstring":"Unknown Content-Encoding","faultcode":"HTTP"}

We've then thined to some issue in the "transportation" of the call to paypal servers and we've tryed to add something in the headers.

First, we discovered that in our http header request some line that we've never used before was missing, for example:
"X-PAYPAL-DEVICE-IPADDRESS: " . $_SERVER['REMOTE_ADDR'] . "\r\n" ;

But this didn't solve the issue.
Then we've added a new line in the soap client call:

'compression' => SOAP_COMPRESSION_ACCEPT,

Adding this solved the issue but no one ever adviced us about the requirement of this part of the code (we're using one of your old PayPal PHP class I think). Probably, this is a linux issue, maybe paypal have sobsituted some server with a newer one and while the older accepted the SOAP request even if it was not with this "compression" parameter, in the newer environment it seems required.

Anyway, everything is back to normality adding this line, we just have an odd time response for the Pay operation than for the Preapproval operation but this might depend on different paypal servers managing one or the other operation.

A complete set of the required http headers and other stuff could be useful for those, like us, with very old adaptive integrations, just to refresh the things. Another question is about SOAP protocol, we're sending everything in 1.1 version but, maybe we should send in SOAP 1.2 ?

Thanks again.


Filippo Ronco
Italy

View solution in original post

Login to Me Too
Who Me Too'd this solution