/**
  * Perform a new query that retrieves you the list of Refund Information.
  *
  * @return an RefundInformation list object.
  * @see {@link com.payhub.ws.api.VerfyResponseInformation};
  */
 public function getAllRefundInformation()
 {
     $url = $this->getUrl() . Refund::$REFUND_ID_LINK;
     $request = $this->setHeadersGet($url, $this->_oauthToken);
     $result = $this->doGet($request);
     if (array_key_exists('_embedded', $result)) {
         foreach ($result['_embedded']['refunds'] as $refunds) {
             $response_tmp = RefundInformation::fromArray($refunds);
             $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;
     }
 }
Ejemplo n.º 2
0
 public function performRefund($request)
 {
     $json = json_encode($this->object_unset_nulls(null));
     curl_setopt($request, CURLOPT_POSTFIELDS, $json);
     $result = $this->doPost($request, $this->getUrl());
     $response = RefundInformation::fromArray($result);
     return $response;
 }
Ejemplo n.º 3
0
 /**
  * Perform a new query that retrieves you the list of Refund Information.
  *
  * @return an RefundInformation list object.
  * @see {@link com.payhub.ws.api.VerfyResponseInformation};
  */
 public function getAllRefundInformation()
 {
     $url = $this->getUrl() . Refund::$REFUND_ID_LINK;
     $request = $this->setHeadersGet($url, $this->_oauthToken);
     $result = $this->doGet($request);
     foreach ($result['_embedded']['refunds'] as $refunds) {
         $response_tmp = RefundInformation::fromArray($refunds);
         $response_tmp->setTransactionManager($this);
         $response[] = $response_tmp;
     }
     return $response;
 }