コード例 #1
0
 /**
  * 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);
 }
コード例 #2
0
 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;
     }
 }
コード例 #3
0
 protected function httpRequest($method, $data)
 {
     $result = Helper::sendHttpRequest($this->getEndpoint($method), $data);
     parse_str($result, $data);
     if (!is_array($data)) {
         $data = array();
     }
     return $data;
 }