diff --git a/src/Services/Gateway/HpsCreditService.php b/src/Services/Gateway/HpsCreditService.php index a63ce3b..7d14514 100644 --- a/src/Services/Gateway/HpsCreditService.php +++ b/src/Services/Gateway/HpsCreditService.php @@ -371,15 +371,16 @@ public function get($transactionId) } /** * @param $startDate - * @param $endDate + * @param $endDate * @param null $filterBy + * @param null $deviceID * * @return array|null * @throws \HpsException * @throws \HpsGatewayException * @throws \HpsInvalidRequestException */ - public function listTransactions($startDate, $endDate, $filterBy = null) + public function listTransactions($startDate, $endDate, $filterBy = null, $deviceId = null) { $this->_filterBy = $filterBy; date_default_timezone_set("UTC"); @@ -395,6 +396,9 @@ public function listTransactions($startDate, $endDate, $filterBy = null) $hpsReportActivity = $xml->createElement('hps:ReportActivity'); $hpsReportActivity->appendChild($xml->createElement('hps:RptStartUtcDT', $startDate)); $hpsReportActivity->appendChild($xml->createElement('hps:RptEndUtcDT', $endDate)); + if ($deviceId !== null) { + $hpsReportActivity->appendChild($xml->createElement('hps:DeviceId', $deviceId)); + } $hpsTransaction->appendChild($hpsReportActivity); return $this->_submitTransaction($hpsTransaction, 'ReportActivity');