Replaced `PayByPhoneScript` with `GetLastDaysHistoryScript` in `main.cpp`. Introduced enhanced date/time utilities and improved database timestamp handling with `DateUtils`. Refactored `TransactionDAO` methods to separate parsing logic and added support for retrieving recent transactions within specified hours. Added the `GetLastDaysHistoryScript` class to parse and save recent transaction history.
34 lines
618 B
C++
34 lines
618 B
C++
#pragma once
|
|
#include "CommonScript.h"
|
|
|
|
class PayByPhoneScript final : public CommonScript {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
~PayByPhoneScript() override;
|
|
|
|
PayByPhoneScript(
|
|
AccountInfo account,
|
|
QString phone,
|
|
QString bankName,
|
|
double amount,
|
|
QObject *parent = nullptr
|
|
);
|
|
|
|
protected:
|
|
void doStart() override;
|
|
|
|
private:
|
|
const AccountInfo m_account;
|
|
const QString m_phone;
|
|
const QString m_bankName;
|
|
const double m_amount;
|
|
|
|
void makePayment(
|
|
const QString &deviceId,
|
|
const QString &pinCode,
|
|
int width,
|
|
int height
|
|
);
|
|
};
|