Right after you do the curl, echo the $response so that you can see it. As rwb said, make sure that you are getting the value you are expecting back. Just because paypal said everything was cool does not mean the data came back properly.
On your strcmp, throw a trim() around $response to get rid of any unexpected spaces (again in line with what rwb said)
I would on that same thing throw a strtoupper() around it to make sure you are comparing upper to upper. trim(strtoupper($response))
Since all your database action occurs inside the if, I would say that you are not getting the expected value.
|