/**
  * @param ClientInterface $client
  * @param GiropayTransactionStatusRequest $giropayRequest
  * @return RequestInterface
  */
 protected function buildTransactionStatusRequest(ClientInterface $client, GiropayTransactionStatusRequest $giropayRequest)
 {
     $requestArray = array();
     $requestArray['merchantId'] = $this->getMerchantId();
     $requestArray['projectId'] = $this->getProjectId();
     if ($giropayRequest->getReference() == "") {
         throw new InvalidArgumentException("Field reference is required");
     }
     $requestArray['reference'] = $giropayRequest->getReference();
     //this works because the hash list in PHP has a sort order (we get the values out in the order we added them)
     $sortedValuesString = implode('', array_values($requestArray));
     $requestArray['hash'] = $this->getHMACMD5Hash($this->getSecret(), $sortedValuesString);
     $request = $client->createRequest("POST", "https://payment.girosolution.de/girocheckout/api/v2/transaction/status", ['body' => $requestArray]);
     return $request;
 }