Enhanced `CommonScript` and `PayByPhoneScript` functionalities by restructuring functions for better readability and parameterization (e.g., device-specific inputs). Included a new transaction handling process and database updates for tracking payment details and statuses.
35 lines
619 B
C++
35 lines
619 B
C++
#pragma once
|
|
|
|
#include "CommonScript.h"
|
|
|
|
class PayByPhoneScript final : public CommonScript {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
PayByPhoneScript(
|
|
AccountInfo account,
|
|
QString phone,
|
|
QString bankName,
|
|
double amount,
|
|
QObject *parent = nullptr
|
|
);
|
|
|
|
~PayByPhoneScript() override;
|
|
|
|
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
|
|
);
|
|
};
|