diff --git a/TransactionReporting/get-settled-batch-list.php b/TransactionReporting/get-settled-batch-list.php index 89292af..cc9f99c 100644 --- a/TransactionReporting/get-settled-batch-list.php +++ b/TransactionReporting/get-settled-batch-list.php @@ -30,7 +30,7 @@ function getSettledBatchList($firstSettlementDate, $lastSettlementDate) $response = $controller->executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX); - if (($response != null) && ($response->getMessages()->getResultCode() == "Ok")) + if (($response != null) && ($response->getMessages()->getResultCode() == "Ok") && ($response->getBatchList() != NULL)) { foreach($response->getBatchList() as $batch) {