vendor/codeages/omnipay-wechatpay/src/Message/CreateOrderRequest.php
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Omnipay\WechatPay\Message;
use Omnipay\Common\Message\ResponseInterface;
use Omnipay\WechatPay\Helper;
/**
* Class CreateOrderRequest
* @package Omnipay\WechatPay\Message
* @link https://pay.weixin.qq.com/wiki/doc/api/app.php?chapter=9_1
* @method CreateOrderResponse send()
*/
class CreateOrderRequest extends \Omnipay\WechatPay\Message\BaseAbstractRequest
{
protected $endpoint = 'https://api.mch.weixin.qq.com/pay/unifiedorder';
/**
* 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->validate('app_id', 'mch_id', 'body', 'out_trade_no', 'total_fee', 'notify_url', 'trade_type', 'spbill_create_ip');
$tradeType = strtoupper($this->getTradeType());
if ($tradeType == 'JSAPI') {
$this->validate('open_id');
}
$data = array('appid' => $this->getAppId(), 'mch_id' => $this->getMchId(), 'device_info' => $this->getDeviceInfo(), 'body' => $this->getBody(), 'detail' => $this->getDetail(), 'attach' => $this->getAttach(), 'out_trade_no' => $this->getOutTradeNo(), 'fee_type' => $this->getFeeType(), 'total_fee' => $this->getTotalFee(), 'spbill_create_ip' => $this->getSpbillCreateIp(), 'time_start' => $this->getTimeStart(), 'time_expire' => $this->getTimeExpire(), 'goods_tag' => $this->getGoodsTag(), 'notify_url' => $this->getNotifyUrl(), 'trade_type' => $this->getTradeType(), 'limit_pay' => $this->getLimitPay(), 'openid' => $this->getOpenId(), 'nonce_str' => md5(uniqid()));
$data = array_filter($data);
$data['sign'] = \Omnipay\WechatPay\Helper::sign($data, $this->getApiKey());
return $data;
}
/**
* @return mixed
*/
public function getTradeType()
{
return $this->getParameter('trade_type');
}
/**
* @return mixed
*/
public function getDeviceInfo()
{
return $this->getParameter('device_Info');
}
/**
* @return mixed
*/
public function getBody()
{
return $this->getParameter('body');
}
/**
* @return mixed
*/
public function getDetail()
{
return $this->getParameter('detail');
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。