Browse Source

**187 的版本 非遠傳的更新(要改遠傳的Code 務必退回 646f9c31 版)**
1. CDFA PHA 要求收據時間 12 小時、加入停車費
2.後台丟到電樁的金額格式 Follow CSU3 OCPP customization message_V1.6

Jessica Tseng 3 years ago
parent
commit
9bbdb30d7f

+ 2 - 2
EVCB_OCPP.WSServer/App.config

@@ -15,8 +15,8 @@
    </connectionStrings>
   <appSettings>   
      <add key="LocalAuthAPI" value="http://172.1.2.187/PortalApi/1" />
-    <add key="WSPort" value="2012" />
-    <add key="WSSPort" value="2013" />  
+    <add key="WSPort" value="2015" />
+    <add key="WSSPort" value="2016" />  
   </appSettings>
   <startup>
     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1" />

+ 33 - 2
EVCB_OCPP.WSServer/Dto/ChargingPrice.cs

@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Globalization;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -8,9 +9,39 @@ namespace EVCB_OCPP.WSServer.Dto
 {
     public class ChargingPrice
     {
-        public string StartTime { set; get; }
+        private string _StartTime = "";
+        private string _EndTime = "";
+        public string StartTime
+        {
+            set
+            {
+                _StartTime = value;
+                if(!value.Contains("M"))
+                {
+                    DateTime dt = new DateTime(2021, 01, 01, int.Parse(_StartTime.Split(':')[0]), int.Parse(_StartTime.Split(':')[1]), 0, DateTimeKind.Utc);
+                    _StartTime = dt.ToString("HH:mm tt", new CultureInfo("en-us"));
+                }
+               
+            }
+            get
+            { return _StartTime; }
+        }
 
-        public string EndTime { set; get; }
+        public string EndTime
+        {
+            set
+            {
+                _EndTime = value;
+                if (!value.Contains("M"))
+                {
+                    DateTime dt = new DateTime(2021, 01, 01, int.Parse(_EndTime.Split(':')[0]), int.Parse(_EndTime.Split(':')[1]), 0, DateTimeKind.Utc);
+                    _EndTime = dt.ToString("HH:mm tt", new CultureInfo("en-us"));
+                }
+                
+            }
+            get
+            { return _EndTime; }
+        }
 
         public decimal Fee { set; get; }
     }

+ 1 - 1
EVCB_OCPP.WSServer/Dto/StationFee.cs

@@ -16,7 +16,7 @@ namespace EVCB_OCPP.WSServer.Dto
         /// <summary>
         /// 停車費
         /// </summary>
-        public decimal Fee { set; get; }
+        public decimal ParkingFee { set; get; }
 
         /// <summary>
         /// 幣別

+ 84 - 36
EVCB_OCPP.WSServer/Message/CoreProfileHandler.cs

@@ -18,6 +18,7 @@ using System.Data;
 using System.Data.Entity;
 using System.Data.SqlClient;
 using System.Diagnostics;
+using System.Globalization;
 using System.Linq;
 using System.Threading.Tasks;
 
@@ -215,7 +216,7 @@ namespace EVCB_OCPP.WSServer.Message
                                         {
                                             registerCount = item.sampledValue.Where(x => x.measurand == Measurand.Energy_Active_Import_Register).ToList().Count;
                                         }
-                                       
+
                                         if (registerCount > 0)
                                         {
                                             string voltage_text = item.sampledValue.Where(x => x.measurand == Measurand.Voltage).Select(x => x.value).FirstOrDefault();
@@ -362,7 +363,6 @@ namespace EVCB_OCPP.WSServer.Message
                                     parameters.Add("@IdTag", _request.idTag, DbType.String, ParameterDirection.Input);
                                     string strSql = "select parentIdTag from [dbo].[LocalListDetail]  where ListId = 27 and IdTag=@IdTag; ";
                                     accountBalance = conn.ExecuteScalar<string>(strSql, parameters);
-
                                 }
                             }
 
@@ -445,7 +445,7 @@ namespace EVCB_OCPP.WSServer.Message
                                  && x.ChargeBoxId == session.ChargeBoxId).FirstOrDefault();
 
                                 //遠傳太久以前的停止充電 直接拒絕 避免電樁持續重送~~~~~~~
-                                if(_request.timestamp < new DateTime(2021,11,1))
+                                if (_request.timestamp < new DateTime(2021, 11, 1))
                                 {
                                     var confirm = new StopTransactionConfirmation()
                                     {
@@ -510,7 +510,7 @@ namespace EVCB_OCPP.WSServer.Message
                                 }
                                 else
                                 {
-                                   
+
                                     result.Exception = new Exception("Can't find transactionId " + _request.transactionId);
 
                                 }
@@ -658,45 +658,46 @@ namespace EVCB_OCPP.WSServer.Message
                                         if (feedto == null || string.IsNullOrEmpty(feedto.Fee)) return result;
                                         string currency = feedto.Fee.Substring(feedto.Fee.Length - 3);
                                         decimal sum = 0;
-                                        // if (feedto.Fee.Length > 10)
+                                        if (feedto.Fee.Length > 10)
                                         {
                                             chargingPrices = JsonConvert.DeserializeObject<List<ChargingPrice>>(feedto.Fee.Split('|')[0]);
                                             foreach (var item in txEnergy.PeriodEnergy)
                                             {
-                                                string startTime = item.Key.Length == 1 ? "0" + item.Key + ":00" : item.Key + ":00";
+                                                DateTime dt = new DateTime(2021, 01, 01, int.Parse(item.Key), 0, 0, DateTimeKind.Utc);
+                                                string startTime = dt.ToString("HH:mm tt", new CultureInfo("en-us"));
                                                 decimal perfee = 0;
+
+                                                //小數點無條件捨去到第三位
+                                                var periodEnergy = (decimal)((int)Decimal.Multiply(item.Value, 1000) / (double)1000);
                                                 if (chargingPrices.Count == 1)
                                                 {
-                                                    perfee = Decimal.Multiply(item.Value, chargingPrices[0].Fee);
+                                                    perfee = Decimal.Multiply(periodEnergy, chargingPrices[0].Fee);
                                                     if (bill.Count == 0)
                                                     {
                                                         bill.Add(new ChargingBill()
                                                         {
-                                                            StartTime = "00:00",
-                                                            EndTime = "23:59",
+                                                            StartTime = "12:00 AM",
+                                                            EndTime = "11:59 PM",
                                                             Fee = chargingPrices[0].Fee
                                                         });
                                                     }
-                                                    bill[0].PeriodEnergy += item.Value;
-                                                    bill[0].PeriodEnergy = Math.Round(bill[0].PeriodEnergy, 3, MidpointRounding.AwayFromZero);
+
+                                                    bill[0].PeriodEnergy += periodEnergy;
 
                                                 }
                                                 else
                                                 {
                                                     var price = chargingPrices.Where(x => x.StartTime == startTime).FirstOrDefault();
-                                                    perfee = Decimal.Multiply(item.Value, price.Fee);
+                                                    perfee = Decimal.Multiply(periodEnergy, price.Fee);
 
                                                     bill.Add(new ChargingBill()
                                                     {
                                                         StartTime = price.StartTime,
                                                         EndTime = price.EndTime,
-                                                        PeriodEnergy = Math.Round(item.Value, 3, MidpointRounding.AwayFromZero),
+                                                        PeriodEnergy = periodEnergy,
                                                         Fee = price.Fee,
 
                                                     });
-
-
-
                                                 }
                                                 if (bill.Count > 0)
                                                 {
@@ -705,12 +706,11 @@ namespace EVCB_OCPP.WSServer.Message
 
                                                     if (bill.Count == 1)
                                                     {
-                                                        bill[0].PeriodEnergy = Math.Round(bill[0].PeriodEnergy, 3, MidpointRounding.AwayFromZero);
+
                                                         bill[bill.Count - 1].Total = DollarRounding(Decimal.Multiply(bill[0].PeriodEnergy, bill[0].Fee), session.Currency);
                                                         sum = bill[bill.Count - 1].Total;
                                                     }
                                                 }
-
                                             }
                                         }
 
@@ -737,35 +737,54 @@ namespace EVCB_OCPP.WSServer.Message
                                             if (tx.UploadedtoTTIA) return result;
                                             var startTime = new DateTime(tx.StartTime.Year, tx.StartTime.Month, tx.StartTime.Day, tx.StartTime.Hour, 0, 0);
                                             List<ChargingBill> confirmbill = new List<ChargingBill>();
-                                            receipt = string.Format("Energy:");
+                                            receipt = string.Format("({0} )Energy:", bill.Sum(x => x.PeriodEnergy));
+
+
                                             while (startTime < tx.StopTime)
                                             {
                                                 if (bill.Count == 1)
                                                 {
                                                     confirmbill = bill;
-                                                    receipt += string.Format("| {0}~{1} @ ${2}/kWh=${3}", bill[0].StartTime, bill[0].EndTime, bill[0].Fee, bill[0].Total);
+                                                    receipt += string.Format("| {0}-{1} @ ${2}/kWh=${3}", tx.StartTime.ToString("HH:mm tt", new CultureInfo("en-us")), tx.StopTime.ToString("HH:mm tt", new CultureInfo("en-us")), bill[0].Fee, bill[0].Total);
                                                     break;
                                                 }
                                                 if (bill.Count > 1)
                                                 {
+                                                    var time = startTime.ToString("HH:mm tt", new CultureInfo("en-us"));
+                                                    var tt = bill.Where(x => x.StartTime ==time).FirstOrDefault();
+                                                    confirmbill.Add(tt);
+                                                    if (confirmbill.Count == 1)
+                                                    {
+                                                        confirmbill[0].StartTime = tx.StartTime.ToString("HH:mm tt", new CultureInfo("en-us"));
+                                                    }
+                                                   
 
-                                                    confirmbill.Add(bill.Where(x => x.StartTime == startTime.ToString("HH:00")).FirstOrDefault());
-                                                    if (confirmbill.Count == 24) break;
-                                                    //if (confirmbill.Count > 1)
-                                                    //{
-                                                    //    receipt += "|";
-                                                    //}
-                                                    receipt += string.Format("| {0}~{1} @ ${2}/kWh=${3}", confirmbill[confirmbill.Count - 1].StartTime, confirmbill[confirmbill.Count - 1].EndTime,
+                                                    var stopTimeText = tx.StopTime.ToString("HH:mm tt", new CultureInfo("en-us"));
+                                                    if (confirmbill[confirmbill.Count - 1].StartTime.Contains(stopTimeText.Split(' ')[1]))
+                                                    {
+                                                        var subHourText = (int.Parse(stopTimeText.Split(':')[0])).ToString();
+                                                        subHourText = subHourText.Length == 1 ? "0" + subHourText : subHourText;
+                                                        if(confirmbill[confirmbill.Count - 1].StartTime.Contains(subHourText))
+                                                        {
+                                                            confirmbill[confirmbill.Count - 1].EndTime = stopTimeText;
+                                                        }
+                                                      
+                                                    }
+                                                    receipt += string.Format("| {0}-{1} @ ${2}/kWh=${3}", confirmbill[confirmbill.Count - 1].StartTime, confirmbill[confirmbill.Count - 1].EndTime,
                                                          confirmbill[confirmbill.Count - 1].Fee, confirmbill[confirmbill.Count - 1].Total);
 
-
+                                                    if (confirmbill.Count == 24) break;
 
                                                 }
                                                 startTime = startTime.AddHours(1);
 
                                             }
-
-                                            receipt += string.Format("|Parking fee: | {0}~{1} @ ${2}/hr=${3}", feedto.StartTime.ToString("HH:mm"), feedto.StopTime.ToString("HH:mm"), fee, parkingCost);
+                                            if (confirmbill.Count > 1)
+                                            {
+                                                receipt += string.Format("|Total Energy Fee : ${0}", confirmbill.Sum(x => x.Total));
+                                            }
+                                            receipt += string.Format("|Parking Fee: | {0}-{1} @ ${2}/hr=${3}", feedto.StartTime.ToString("HH:mm tt", new CultureInfo("en-us")),
+                                            feedto.StopTime.ToString("HH:mm tt", new CultureInfo("en-us")), fee, parkingCost);
                                             tx.Cost = sum + parkingCost;
                                             tx.Receipt = receipt;
                                             tx.UploadedtoTTIA = true;
@@ -790,8 +809,18 @@ namespace EVCB_OCPP.WSServer.Message
                                                                 data = JsonConvert.SerializeObject(new
                                                                 {
                                                                     txId = txEnergy.TxId,
-                                                                    description = string.Format("Connection Fee: $0.00 {0}; Session Fee: ${1} {0}; Occupancy Fee: " +
-                                                                 "${2} {0}; Total Cost: ${3} {0}; Account Balance: ${4} {0}", currency, sum, parkingCost, tx.Cost, accountBalance - tx.Cost)
+                                                                    //   description = string.Format("Connection Fee: $0.00 {0}; Session Fee: ${1} {0}; Occupancy Fee: " +
+                                                                    //"${2} {0}; Total Cost: ${3} {0}; Account Balance: ${4} {0}", currency, sum, parkingCost, tx.Cost, accountBalance - tx.Cost)
+                                                                    description = JsonConvert.SerializeObject(new
+                                                                    {
+                                                                        chargedEnergy = bill.Sum(x => x.PeriodEnergy),
+                                                                        chargingFee = sum,
+                                                                        parkTime = (int)stoptime.Subtract(starttime).TotalSeconds,
+                                                                        parkingFee = parkingCost,
+                                                                        currency = currency,
+                                                                        couponPoint = 0,
+                                                                        accountBalance = accountBalance - tx.Cost
+                                                                    })
                                                                 })
 
                                                             },
@@ -805,7 +834,6 @@ namespace EVCB_OCPP.WSServer.Message
 
                                             using (SqlConnection conn = new SqlConnection(webConnectionString))
                                             {
-
                                                 var parameters = new DynamicParameters();
                                                 parameters.Add("@IdTag", tx.StartIdTag, DbType.String, ParameterDirection.Input);
                                                 parameters.Add("@parentIdTag", accountBalance - tx.Cost, DbType.String, ParameterDirection.Input);
@@ -820,7 +848,7 @@ namespace EVCB_OCPP.WSServer.Message
                                                 {
                                                     { "email","2"},
                                                     { "to","wonderj@phihongusa.com;jessica_tseng@phihong.com.tw"}
-
+                                                    //{ "to","jessica_tseng@phihong.com.tw"}
                                                }, null);
 
                                                 Console.WriteLine(JsonConvert.SerializeObject(mail_response));
@@ -830,6 +858,17 @@ namespace EVCB_OCPP.WSServer.Message
                                         }
                                         else
                                         {
+
+                                            // 計算停車費
+                                            var fee = decimal.Parse(feedto.Fee.Split('&')[1]);
+                                            decimal accountBalance = 0;
+                                            var stoptime = DateTime.Parse(DateTime.UtcNow.ToString("yyyy/MM/dd HH:mm"));
+                                            var starttime = DateTime.Parse(feedto.StartTime.ToString("yyyy/MM/dd HH:mm"));
+                                            decimal.TryParse(feedto.Fee.Split('+')[1], out accountBalance);
+                                            var totalHours = stoptime.Subtract(starttime).TotalHours;
+                                            var parkingCost = Decimal.Multiply((decimal)totalHours, fee);
+                                            parkingCost = DollarRounding(parkingCost, session.Currency);
+
                                             db.ServerMessage.Add(new ServerMessage()
                                             {
                                                 ChargeBoxId = session.ChargeBoxId,
@@ -844,8 +883,17 @@ namespace EVCB_OCPP.WSServer.Message
                                                      data = JsonConvert.SerializeObject(new
                                                      {
                                                          txId = txEnergy.TxId,
-                                                         description = string.Format("Connection Fee: $0.00 {0}; Session Fee: ${1} {0}; Occupancy Fee: " +
-                                                         "$0.00 {0}; Total Cost: ${1} {0}; Account Balance: $0.00 {0}", currency, sum)
+                                                         //description = string.Format("Connection Fee: $0.00 {0}; Session Fee: ${1} {0}; Occupancy Fee: " +
+                                                         //"${2} {0}; Total Cost: ${3} {0}; Account Balance: $0.00 {0}", currency, sum, parkingCost, sum + parkingCost),
+                                                         description = JsonConvert.SerializeObject(new
+                                                         {
+                                                             chargedEnergy = bill.Sum(x => x.PeriodEnergy),
+                                                             chargingFee = sum,
+                                                             parkTime = (int)stoptime.Subtract(starttime).TotalSeconds,
+                                                             parkingFee = parkingCost,
+                                                             currency = currency
+                                                         })
+
                                                      })
 
                                                  },

+ 1 - 1
EVCB_OCPP.WSServer/Properties/AssemblyInfo.cs

@@ -35,4 +35,4 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyVersion("0.1.0.0")]
 [assembly: AssemblyFileVersion("0.1.0.0")]
 
-[assembly: AssemblyInformationalVersion("997b465")]
+[assembly: AssemblyInformationalVersion("646f9c3")]

+ 43 - 5
EVCB_OCPP.WSServer/ProtalServer.cs

@@ -286,7 +286,7 @@ namespace EVCB_OCPP.WSServer
 
         }
 
-     
+
         private void CheckEVSEConfigure(string chargeBoxId)
         {
             if (string.IsNullOrEmpty(chargeBoxId)) return;
@@ -724,7 +724,7 @@ namespace EVCB_OCPP.WSServer
                                     }
                                     else
                                     {
-                                        await SetDefaultFee(session);
+                                        await SetDefaultFee(session);                                        
                                     }
                                 }
 
@@ -1376,6 +1376,44 @@ namespace EVCB_OCPP.WSServer
 
                                         }); ;
 
+                                        if (session.CustomerId == new Guid("10C7F5BD-C89A-4E2A-8611-B617E0B41A73"))
+                                        {
+                                            db.ServerMessage.Add(new ServerMessage()
+                                            {
+                                                ChargeBoxId = session.ChargeBoxId,
+                                                CreatedBy = "Server",
+                                                CreatedOn = DateTime.UtcNow,
+                                                OutAction = Actions.ChangeConfiguration.ToString(),
+                                                OutRequest = JsonConvert.SerializeObject(
+                                                   new ChangeConfigurationRequest()
+                                                   {
+                                                       key = "ConnectionTimeOut",
+                                                       value = "120"
+                                                   },
+                                                   new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, Formatting = Formatting.None }),
+                                                SerialNo = Guid.NewGuid().ToString(),
+                                                InMessage = string.Empty
+
+                                            });
+                                            db.ServerMessage.Add(new ServerMessage()
+                                            {
+                                                ChargeBoxId = session.ChargeBoxId,
+                                                CreatedBy = "Server",
+                                                CreatedOn = DateTime.UtcNow,
+                                                OutAction = Actions.ChangeConfiguration.ToString(),
+                                                OutRequest = JsonConvert.SerializeObject(
+                                                   new ChangeConfigurationRequest()
+                                                   {
+                                                       key = "MeterValueSampleInterval",
+                                                       value = "3"
+                                                   },
+                                                   new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, Formatting = Formatting.None }),
+                                                SerialNo = Guid.NewGuid().ToString(),
+                                                InMessage = string.Empty
+
+                                            });
+                                        }
+
                                         await db.SaveChangesAsync();
 
                                     }
@@ -1404,7 +1442,7 @@ namespace EVCB_OCPP.WSServer
             {
                 var parameters = new DynamicParameters();
                 parameters.Add("@MachineId", client.MachineId, DbType.String, ParameterDirection.Input);
-                string displayPricestrSql = " SELECT  [FeeName],[Currency],[Fee]  FROM[StationMachine]  left join [dbo].[Station]" +
+                string displayPricestrSql = " SELECT  [FeeName],[Currency],[ParkingFee]  FROM[StationMachine]  left join [dbo].[Station]" +
                "  on[StationMachine].StationId = Station.[Id]  where StationMachine.MachineId=@MachineId and Station.IsBilling=1; ";
                 string strSql = " SELECT CAST( [StartTime] as varchar(5)) StartTime,CAST( [EndTime] as varchar(5)) EndTime,[Fee]  FROM[StationMachine]  left join [dbo].[StationFee]" +
                 " on[StationMachine].StationId = StationFee.StationId  where StationMachine.MachineId =@MachineId ; ";
@@ -1414,7 +1452,7 @@ namespace EVCB_OCPP.WSServer
                 {
                     return string.Empty;
                 }
-              
+
                 var chargingPriceResult = await conn.QueryAsync<ChargingPrice>(strSql, parameters);
                 client.ChargingPrices = chargingPriceResult.ToList();
                 if (string.IsNullOrEmpty(client.ChargingPrices[0].StartTime))
@@ -1423,7 +1461,7 @@ namespace EVCB_OCPP.WSServer
                 }
                 displayPriceText = stationPrice.FeeName;
                 client.Currency = stationPrice.Currency;
-                client.ParkingFee = stationPrice.Fee;
+                client.ParkingFee = stationPrice.ParkingFee;
                 client.IsBilling = true;
             }
 

+ 47 - 2
EVCB_OCPP.WSServer/Service/LocalBusinessService.cs

@@ -21,9 +21,54 @@ namespace EVCB_OCPP.WSServer.Service
 
         async public Task<IdTagInfo> Authorize(string chargeBoxId, string idTag)
         {
-            await Task.Delay(10);          
+            await Task.Delay(10);
+            IdTagInfo info = new IdTagInfo() { status = AuthorizationStatus.Invalid };
+            try
+            {
+
+                OuterHttpClient _client = new OuterHttpClient();
+
+
+                string url = ConfigurationManager.AppSettings["LocalAuthAPI"];
+
+
+                HttpClientService service = new HttpClientService();
+
+                Dictionary<string, string> postData = new Dictionary<string, string>()
+                {
+                  { "ChargeBoxId", chargeBoxId },
+                  { "IdTag", idTag },
+
+
+                };
+                var _innerresult = await service.PostFormDataAsync(url, postData, null);
+
+
+                if (_innerresult.StatusCode == HttpStatusCode.OK)
+                {
+                    JObject jo = JObject.Parse(_innerresult.Response);
+                    if (jo["code"].ToString() == "1")
+                    {
+                        try
+                        {
+                            info.status = (AuthorizationStatus)Enum.Parse(typeof(AuthorizationStatus), jo["message"].ToString());
+                        }
+                        catch (Exception)
+                        {
+                            ;
+                        }
+
+
+                    }
+
+                }
 
-            return new IdTagInfo() { expiryDate = DateTime.UtcNow.AddDays(1), status = AuthorizationStatus.Accepted };
+            }
+            catch (Exception ex)
+            {
+                ;
+            }
+            return info;
 
         }
 

+ 18 - 4
EVCB_OCPP.WSServer/Service/OuterBusinessService.cs

@@ -49,26 +49,37 @@ namespace EVCB_OCPP.WSServer.Service
         static private ILogger logger = NLog.LogManager.GetCurrentClassLogger();
         private OuterHttpClient httpClient = new OuterHttpClient();
         private CustomerSignMaterial signMaterial = null;
-
+        private string CustomerId = string.Empty;
         public OuterBusinessService(string customerId)
         {
+            CustomerId = customerId;
             signMaterial = GetSign(customerId);
         }
 
 
         async public Task<IdTagInfo> Authorize(string chargeBoxId, string idTag)
         {
+            Console.WriteLine(string.Format("Authorize: {0}", CustomerId));
             IdTagInfo result = new IdTagInfo() { status = AuthorizationStatus.Invalid };
             try
             {
+               
                 string requestParams = string.Format("charging_auth?ChargeBoxId={0}&IdTag={1}", chargeBoxId, idTag);
 
+                if (CustomerId.ToLower() == "9e6bfdcc-09fb-4dab-a428-43fe507600a3")
+                {
+                    logger.Error(chargeBoxId+" Charging Monitor======================================>");
+                    logger.Error(signMaterial.APIUrl + requestParams);
+                }
                 var response = await httpClient.Post(signMaterial.APIUrl + requestParams, new Dictionary<string, string>()
                             {
                                 { "PartnerId",signMaterial.Id}
 
                             }, null, signMaterial.SaltKey).ConfigureAwait(false);
-
+                if (CustomerId.ToLower() == "9e6bfdcc-09fb-4dab-a428-43fe507600a3")
+                {                  
+                    logger.Error(JsonConvert.SerializeObject(response));
+                }
                 if (response.Success)
                 {
                     Console.WriteLine(response.Response);
@@ -85,7 +96,7 @@ namespace EVCB_OCPP.WSServer.Service
                     {
                         string _Message = jo["ParentIdTag"].Value<string>();
                         result.parentIdTag = _Message;
-                       
+
                     }
 
 
@@ -107,7 +118,10 @@ namespace EVCB_OCPP.WSServer.Service
 
                 logger.Error(chargeBoxId + " OuterBusinessService.Authorize Ex: " + ex.ToString());
             }
-
+            if (CustomerId.ToLower() == "9e6bfdcc-09fb-4dab-a428-43fe507600a3")
+            {
+                result.status = AuthorizationStatus.Accepted;               
+            }
             return result;
 
         }