'/v3/pay/transactions/h5', 'app' => '/v3/pay/transactions/app', 'jsapi' => '/v3/pay/transactions/jsapi', 'native' => '/v3/pay/transactions/native', ]; if (empty($types[$type])) { throw new InvalidArgumentException("Payment {$type} not definded."); } else { return $this->doRequest('POST', $types[$type], $options, true); } } /** * 订单查询 * @param string $orderNo * @return array * @throws InvalidResponseException * @throws LocalCacheException */ public function query($orderNo) { $pathinfo = "/v3/pay/transactions/out-trade-no/{$orderNo}"; return $this->doRequest('GET', "{$pathinfo}?mchid={$this->config['mch_id']}", '', true); } }