From caf7c4e84efbb2fd3e26d6a51135e895f9576ace Mon Sep 17 00:00:00 2001 From: Sebastian Lukas Date: Fri, 22 Mar 2024 13:17:02 +0100 Subject: [PATCH] Provided fix if both payment options are disabled in the EvseManager Signed-off-by: Sebastian Lukas --- modules/EvseManager/EvseManager.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/EvseManager/EvseManager.cpp b/modules/EvseManager/EvseManager.cpp index 66f9f569d..9776b97fd 100644 --- a/modules/EvseManager/EvseManager.cpp +++ b/modules/EvseManager/EvseManager.cpp @@ -117,6 +117,10 @@ void EvseManager::ready() { if (config.payment_enable_contract) { payment_options.push_back(types::iso15118_charger::PaymentOption::Contract); } + if (config.payment_enable_eim == false and config.payment_enable_contract == false) { + EVLOG_warning << "Both payment options are disabled! ExternalPayment is nevertheless enabled in this case."; + payment_options.push_back(types::iso15118_charger::PaymentOption::ExternalPayment); + } r_hlc[0]->call_session_setup(payment_options, config.payment_enable_contract); r_hlc[0]->subscribe_dlink_error([this] { @@ -720,6 +724,11 @@ void EvseManager::ready() { if (config.payment_enable_contract) { payment_options.push_back(types::iso15118_charger::PaymentOption::Contract); } + if (config.payment_enable_eim == false and config.payment_enable_contract == false) { + EVLOG_warning + << "Both payment options are disabled! ExternalPayment is nevertheless enabled in this case."; + payment_options.push_back(types::iso15118_charger::PaymentOption::ExternalPayment); + } r_hlc[0]->call_session_setup(payment_options, config.payment_enable_contract); } });