public function refundTransaction($transactionID, $amount) {
    if ($transactionID !== null && $amount !== null && (is_int($amount) || ctype_digit($amount))) {
      $url = $this->url . str_replace(":transactionID", $transactionID, Connect2PayClient::$API_ROUTES['TRANS_REFUND']);
      $trans = array();
      $trans['apiVersion'] = $this->apiVersion;
      $trans['amount'] = intval($amount);

      $result = $this->doPost($url, json_encode($trans));

      $this->status = null;
      if ($result != null && is_array($result)) {
        $this->status = new RefundStatus();
        if (isset($result['code'])) {
          $this->status->setCode($result['code']);
        }
        if (isset($result['message'])) {
          $this->status->setMessage($result['message']);
        }
        if (isset($result['transactionID'])) {
          $this->status->setTransactionID($result['transactionID']);
        }
        if (isset($result['operation'])) {
          $this->status->setOperation($result['operation']);
        }

        return $this->status;
      } else {
        $this->clientErrorMessage = 'No result received from refund call';
      }
    } else {
      $this->clientErrorMessage = '"transactionID" must not be null, "amount" must be a positive integer';
    }

    return null;
  }