[英]Paypal Sandbox IPN no Response
我使用Zend Framework 2作为我的Paypal付款监听器。 在沙盒环境中付款时会触发我的监听器,但是当我生成答复Paypal的请求以获取VERIFIED或INVALID响应时,却没有响应。 Web服务器日志中没有任何内容,没有错误,也没有引发异常。 已经尝试了dispatch和Send方法。
有什么办法可以查看请求是否发送到Paypal沙箱? 在沙箱中的任何地方,我都能看到吗? 还是有什么办法可以让我看到回复。 我正在使用Amazon WS,但我不认为它是因为最初触发了侦听器而被阻止了。
非常感谢
IPN侦听器的代码如下:
$request1 = $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 = $request1->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());
}
最终使用https://github.com/paypal/ipn-code-samples/blob/master/IPN_PHP.txt上的paypal代码解决了上述问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.