Saturday, 7 September 2013

Paypal Sandbox IPN no Repsonse

Paypal Sandbox IPN no Repsonse

I am using Zend Framework 2 as my listener for a Paypal payment. My
listener is triggered when the payment is made in the sandbox environment,
but when i generate the request to reply to Paypal in order to get a
VERIFIED or INVALID respone i do not get a response. There is nothing
coming up in the web server logs, no errors and no exception is thrown.
Have tried both the dispatch and Send methods
Is there any way i can see if the request is sent to Paypal sandbox?
Anywhere in the sandbox i can see this? Or is there anyway i can see the
response come back. Am using Amazon WS but i dont think its getting
blocked as the listener is initially triggered.
Many thanks
Code for IPN listenter is below: $request = $this->getRequest();
// Follow Paypal IPN protocol
// First send back to PayPal received request
$request = new Request();
$request->setMethod(Request::METHOD_POST);
$client = new Client();
$client->setRequest($request);
$client->setUri('https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_notify-validate');
$postArray = $request->getPost()->getArrayCopy();
$client->setParameterPost($postArray);
$requestHeaders = $client->getRequest()->getHeaders();
try {
$response = $client->send();
//$response = $client->dispatch($request);
} catch (Exception $e) {
$logger->info("Exception:");
$logger->info($e->getMessage());
}

No comments:

Post a Comment