Example #1
0
 public function performVoidTransaction($request)
 {
     $json = json_encode($this->object_unset_nulls(null));
     echo $json;
     curl_setopt($request, CURLOPT_POSTFIELDS, $json);
     $result = $this->doPost($request, $this->getUrl());
     $response = VoidResponseInformation::fromArray($result);
     return $response;
 }
 /**
  * Perform a new query that retrieves you the list of Voids Information.
  *
  * @return an LastVoidResponseInformation list object.
  * @see {@link com.payhub.ws.api.VoidResponseInformation};
  */
 public function getAllVoidInformation()
 {
     $url = $this->getUrl() . VoidTransaction::$VOID_ID_LINK;
     $request = $this->setHeadersGet($url, $this->_oauthToken);
     $result = $this->doGet($request);
     if (array_key_exists('_embedded', $result)) {
         foreach ($result['_embedded']['voids'] as $voids) {
             $response_tmp = VoidResponseInformation::fromArray($voids);
             $response_tmp->setTransactionManager($this);
             $response[] = $response_tmp;
         }
         return $response;
     } else {
         $errors_tmp = new Errors();
         foreach ($result as $errorData) {
             $errors_tmp = Errors::fromArray($errorData);
         }
         $errors[] = $errors_tmp;
         return $errors;
     }
 }
 /**
  * Perform a new query that retrieves you the list of Voids Information.
  *
  * @return an LastVoidResponseInformation list object.
  * @see {@link com.payhub.ws.api.VoidResponseInformation};
  */
 public function getAllVoidInformation()
 {
     $url = $this->getUrl() . VoidTransaction::$VOID_ID_LINK;
     $request = $this->setHeadersGet($url, $this->_oauthToken);
     $result = $this->doGet($request);
     foreach ($result['_embedded']['voids'] as $voids) {
         $response_tmp = VoidResponseInformation::fromArray($voids);
         $response_tmp->setTransactionManager($this);
         $response[] = $response_tmp;
     }
     return $response;
 }