/** * Send the request with specified data * * @param mixed $data The data to send * * @return ResponseInterface */ public function sendData($data) { $endpoint = $this->getEndpoint('trade'); $result = Helper::sendHttpRequest($endpoint, $data); parse_str($result, $data); if (!is_array($data)) { $data = array(); } return $this->response = new LegacyMobilePurchaseResponse($this, $data); }
public function getTradeNo() { $endpoint = $this->getRequest()->getEndpoint('app'); $result = Helper::sendHttpRequest($endpoint, $this->data); parse_str($result, $data); if (is_array($data) && isset($data['tn'])) { return $data['tn']; } else { return null; } }
protected function httpRequest($method, $data) { $result = Helper::sendHttpRequest($this->getEndpoint($method), $data); parse_str($result, $data); if (!is_array($data)) { $data = array(); } return $data; }