\n";
- responseStream << "\t\t\tUngültige Seite, wenn du das siehst stimmt hier etwas nicht. Bitte wende dich an den Server-Admin. \n";
- responseStream << "\t\t
\n";
// begin include footer.cpsp
responseStream << "\t
\n";
responseStream << "\t\t\t";
diff --git a/src/cpp/HTTPInterface/ElopageWebhook.cpp b/src/cpp/HTTPInterface/ElopageWebhook.cpp
index 02cac9291..dfd70a90c 100644
--- a/src/cpp/HTTPInterface/ElopageWebhook.cpp
+++ b/src/cpp/HTTPInterface/ElopageWebhook.cpp
@@ -2,6 +2,7 @@
#include "Poco/Net/HTTPServerRequest.h"
#include "Poco/Net/HTTPServerResponse.h"
#include "Poco/URI.h"
+#include "Poco/Logger.h"
#include "Poco/Data/Binding.h"
using namespace Poco::Data::Keywords;
@@ -102,7 +103,6 @@ void ElopageWebhook::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::
return;
}
-
// write stream result also to file
static Poco::Mutex mutex;
@@ -112,7 +112,9 @@ void ElopageWebhook::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::
Poco::FileOutputStream file("elopage_webhook_requests.txt", std::ios::out | std::ios::app);
if (!file.good()) {
- printf("[ElopageWebhook::handleRequest] error creating file with name: elopage_webhook_requests.txt\n");
+ Poco::Logger& logging(Poco::Logger::get("errorLog"));
+ logging.error("[ElopageWebhook::handleRequest] error creating file with name: elopage_webhook_requests.txt");
+ //printf("[ElopageWebhook::handleRequest] error creating file with name: elopage_webhook_requests.txt\n");
mutex.unlock();
return;
}
@@ -172,6 +174,7 @@ void HandleElopageRequestTask::writeUserIntoDB()
use(mEmail), use(mFirstName), use(mLastName);
try {
insert.execute();
+ //printf("user written into db\n");
}
catch (Poco::Exception& ex) {
addError(new ParamError(__FUNCTION__, "mysql error", ex.displayText().data()));
@@ -233,7 +236,7 @@ int HandleElopageRequestTask::run()
std::cerr << __FUNCTION__ << "Unknown error" << '\n';
}
std::string order_id = mRequestData.get("order_id", "");
- addError(new ParamError("HandleElopageRequestTask", "order_id", order_id.data()));
+ auto param_error_order_id = new ParamError("HandleElopageRequestTask", "order_id", order_id.data());
// only for product 36001 and 43741 create user accounts and send emails
if (product_id == 36001 || product_id == 43741) {
@@ -241,22 +244,25 @@ int HandleElopageRequestTask::run()
mFirstName = mRequestData.get("payer[first_name]", "");
mLastName = mRequestData.get("payer[last_name]", "");
- printf("LastName: %s\n", mLastName.data());
+ /* printf("LastName: %s\n", mLastName.data());
for (int i = 0; i < mLastName.size(); i++) {
char c = mLastName.data()[i];
printf("%d ", c);
}
printf("\n\n");
+ */
// validate input
if (!validateInput()) {
// if input is invalid we can stop now
+ addError(param_error_order_id);
sendErrorsAsEmail();
return -1;
}
// if user exist we can stop now
if (getUserIdFromDB()) {
+ addError(param_error_order_id);
sendErrorsAsEmail();
return -2;
}
@@ -277,6 +283,7 @@ int HandleElopageRequestTask::run()
// we didn't get a user_id, something went wrong
if (!user_id) {
addError(new Error("User loadEntryDBId", "user_id is zero"));
+ addError(param_error_order_id);
sendErrorsAsEmail();
return -3;
}
@@ -288,6 +295,7 @@ int HandleElopageRequestTask::run()
if (!emailVerification->getCode()) {
// exit if email verification code is empty
addError(new Error("Email verification", "code is empty, error in random?"));
+ addError(param_error_order_id);
sendErrorsAsEmail();
return -4;
}
@@ -322,8 +330,10 @@ int HandleElopageRequestTask::run()
// if errors occured, send via email
if (errorCount() > 1) {
+ addError(param_error_order_id);
sendErrorsAsEmail();
}
+ delete param_error_order_id;
return 0;
}
\ No newline at end of file
diff --git a/src/cpp/HTTPInterface/HandleFileRequest.h b/src/cpp/HTTPInterface/HandleFileRequest.h
index dd5f99ea8..b11a3c721 100644
--- a/src/cpp/HTTPInterface/HandleFileRequest.h
+++ b/src/cpp/HTTPInterface/HandleFileRequest.h
@@ -9,6 +9,9 @@ class HandleFileRequest : public Poco::Net::HTTPRequestHandler
{
public:
void handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net::HTTPServerResponse& response);
+
+protected:
+
};
diff --git a/src/cpp/HTTPInterface/LoginPage.cpp b/src/cpp/HTTPInterface/LoginPage.cpp
index f32c53d40..32b797b36 100644
--- a/src/cpp/HTTPInterface/LoginPage.cpp
+++ b/src/cpp/HTTPInterface/LoginPage.cpp
@@ -136,7 +136,7 @@ void LoginPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net::
responseStream << "\n";
responseStream << "
\n";
responseStream << "\t
Login Server in Entwicklung
\n";
- responseStream << "\t
Alpha 0.7.0
\n";
+ responseStream << "\t
Alpha 0.8.0
\n";
responseStream << "
\n";
responseStream << "
+
+ <%= langCatalog->gettext("Funktioniert dein E-Mail Verification Code nicht?")%>
+ <%= langCatalog->gettext("Schicke mir eine E-Mail und ich kümmere mich darum: ")%>
+ E-Mail
+
-
\ No newline at end of file
diff --git a/src/cpsp/header.cpsp b/src/cpsp/header.cpsp
index ed055b430..3fd21f9e1 100644
--- a/src/cpsp/header.cpsp
+++ b/src/cpsp/header.cpsp
@@ -12,7 +12,7 @@