From 4d7e5263eec13ba7dffc9d2965ab314529bf0976 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Wed, 24 Jul 2024 17:34:28 +0200 Subject: [PATCH] Added parsing of pop_product_id and pop_product_name. --- library/src/configuration.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/library/src/configuration.cpp b/library/src/configuration.cpp index 80060e6..dd1c8d0 100644 --- a/library/src/configuration.cpp +++ b/library/src/configuration.cpp @@ -582,6 +582,13 @@ bool Configuration::ParseJson(Configuration* cfg, const char* json) this->currentPaymentOptions.last().pop_id = k->value.GetInt(); } else if (strcmp(inner_obj_name, "pop_label") == 0) { this->currentPaymentOptions.last().pop_label = k->value.GetString(); + } else if (strcmp(inner_obj_name, "pop_product_id") == 0) { + this->currentPaymentOptions.last().pop_product_id = k->value.GetInt(); + } else if (strcmp(inner_obj_name, "pop_product_name") == 0) { + if (k->value.IsString()) { + QString const &s = QString::fromStdString(k->value.GetString()); + this->currentPaymentOptions.last().pop_product_name = s; + } } else if (strcmp(inner_obj_name, "pop_payment_method_id") == 0) { this->currentPaymentOptions.last().pop_payment_method_id = k->value.GetInt(); } else if (strcmp(inner_obj_name, "pop_day_end_time") == 0) {