vendor/codeages/omnipay-alipay/src/Requests/LegacyQueryRequest.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Omnipay\Alipay\Requests;
use Omnipay\Alipay\Responses\LegacyQueryResponse;
use Omnipay\Common\Message\ResponseInterface;
/**
* Class LegacyQueryRequest
* @package Omnipay\Alipay\Requests
* @link http://aopsdkdownload.cn-hangzhou.alipay-pub.aliyun-inc.com/demo/alipaysinglequery.zip
*/
class LegacyQueryRequest extends \Omnipay\Alipay\Requests\AbstractLegacyRequest
{
protected $service = 'single_trade_query';
/**
* Send the request with specified data
*
* @param mixed $data The data to send
*
* @return ResponseInterface
*/
public function sendData($data)
{
$url = sprintf('%s?%s', $this->getEndpoint(), http_build_query($this->getData()));
$result = $this->httpClient->get($url)->send()->getBody();
$xml = simplexml_load_string($result);
$json = json_encode($xml);
$data = json_decode($json, true);
return $this->response = new \Omnipay\Alipay\Responses\LegacyQueryResponse($this, $data);
}
/**
* Get the raw data array for this message. The format of this varies from gateway to
* gateway, but will usually be either an associative array, or a SimpleXMLElement.
*
* @return mixed
*/
public function getData()
{
$this->validateParams();
$data = array('service' => $this->service, 'partner' => $this->getPartner(), 'trade_no' => $this->getTradeNo(), 'out_trade_no' => $this->getOutTradeNo(), '_input_charset' => $this->getInputCharset());
$data['sign'] = $this->sign($data, $this->getSignType());
return $data;
}
protected function validateParams()
{
$this->validate('partner', '_input_charset');
$this->validateOne('trade_no', 'out_trade_no');
}
/**
* @return mixed
*/
public function getTradeNo()
{
return $this->getParameter('trade_no');
}
/**
* @return mixed
*/
public function getOutTradeNo()
{
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。