Default ATG to send authorize command before starting a transaction
[e-mobility-charging-stations-simulator.git] / src / charging-station / AutomaticTransactionGenerator.ts
index 0562a8973bb8bd36a60f6353e6503339e6111a63..7268f4459c9d7ef5ba6818534a5725445ca8b3af 100644 (file)
@@ -128,7 +128,7 @@ export default class AutomaticTransactionGenerator {
   private async startTransaction(connectorId: number, self: AutomaticTransactionGenerator): Promise<StartTransactionResponse | AuthorizeResponse> {
     if (self.chargingStation.hasAuthorizedTags()) {
       const tagId = self.chargingStation.getRandomTagId();
-      if (self.chargingStation.stationInfo.AutomaticTransactionGenerator.requireAuthorize) {
+      if (self.chargingStation.getAutomaticTransactionGeneratorRequireAuthorize()) {
         // Authorize tagId
         const authorizeResponse = await self.chargingStation.ocppRequestService.sendAuthorize(tagId);
         if (authorizeResponse?.idTagInfo?.status === AuthorizationStatus.ACCEPTED) {