簡體   English   中英

貝寶沙盒IPN無響應

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM