vendor/codeages/omnipay-alipay/src/Requests/AopTradePayRequest.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Omnipay\Alipay\Requests;
use Omnipay\Alipay\Responses\AopTradeCancelResponse;
use Omnipay\Alipay\Responses\AopTradePayResponse;
use Omnipay\Alipay\Responses\AopTradeQueryResponse;
use Omnipay\Common\Exception\InvalidRequestException;
/**
* Class AopTradePayRequest
* @package Omnipay\Alipay\Requests
*
* @link https://doc.open.alipay.com/docs/api.htm?docType=4&apiId=850
*/
class AopTradePayRequest extends \Omnipay\Alipay\Requests\AbstractAopRequest
{
protected $method = 'alipay.trade.pay';
protected $notifiable = true;
protected $polling = true;
protected $pollingWait = 3;
protected $pollingAttempts = 10;
/**
* @var AopTradePayResponse|AopTradeQueryResponse|AopTradeCancelResponse
*/
protected $response;
/**
* Send the request with specified data
*
* @param mixed $data The data to send
*
* @return AopTradePayResponse|AopTradeQueryResponse
* @throws InvalidRequestException
*/
public function sendData($data)
{
$data = parent::sendData($data);
$this->response = new \Omnipay\Alipay\Responses\AopTradePayResponse($this, $data);
if ($this->response->isWaitPay() && $this->polling) {
$this->polling();
}
return $this->response;
}
/**
* @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;
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。