bring alive

This commit is contained in:
einhornimmond 2021-10-07 16:29:28 +02:00
parent 348ece411a
commit b3b603b59e
3 changed files with 7 additions and 1 deletions

View File

@ -7,7 +7,7 @@ Poco::JSON::Object* JsonHasElopage::handle(Poco::Dynamic::Var params)
if (result) {
return result;
}
auto elopage_buy = Poco::AutoPtr<model::table::ElopageBuy>();
auto elopage_buy = Poco::AutoPtr<model::table::ElopageBuy>(new model::table::ElopageBuy);
result = stateSuccess();
result->set("hasElopage", elopage_buy->isExistInDB("email", mSession->getNewUser()->getModel()->getEmail()));

View File

@ -9,6 +9,11 @@ namespace model {
"product[affiliate_program_id]", "publisher[id]", "order_id", "product_id",
"product[price]", "payer[email]", "publisher[email]", "payment_state", "success_date", "event" };
ElopageBuy::ElopageBuy()
{
}
ElopageBuy::ElopageBuy(const Poco::Net::NameValueCollection& elopage_webhook_requestData)
: mPayed(false)
{

View File

@ -31,6 +31,7 @@ namespace model {
{
public:
ElopageBuy(const Poco::Net::NameValueCollection& elopage_webhook_requestData);
ElopageBuy();
// generic db operations
const char* getTableName() const { return "elopage_buys"; }