Omnipay\Alipay\Responses\AopTradeQueryResponse::isWaitPay PHP Метод

isWaitPay() публичный Метод

public isWaitPay ( )
    public function isWaitPay()
    {
        return $this->getTradeStatus() == 'WAIT_BUYER_PAY';
    }

Usage Example

 /**
  * @link https://img.alicdn.com/top/i1/LB14VRALXXXXXcnXXXXXXXXXXXX
  */
 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();
     }
 }