Omnipay\Alipay\Requests\AopTradePayRequest::polling PHP Метод

polling() защищенный Метод

protected polling ( )
    protected function polling()
    {
        $currentAttempt = 0;
        while ($currentAttempt++ < $this->pollingAttempts) {
            /**
             * Query Order Trade Status
             */
            $this->query();
            if ($this->response->getCode() >= 40000) {
                break;
            } elseif ($this->response->isPaid()) {
                break;
            } elseif ($this->response->isClosed()) {
                break;
            }
            sleep($this->pollingWait);
        }
        /**
         * Close Order
         */
        if ($this->response->isWaitPay()) {
            $this->cancel();
        }
    }