fix: add logs billing

This commit is contained in:
NickVs2015
2026-06-04 18:00:06 +03:00
parent 31709af1b5
commit 9d0cc3a135
3 changed files with 40 additions and 10 deletions
@@ -220,6 +220,8 @@ ErrorCode ServicesCatalogController::fillAvailableServices(QJsonObject &services
QByteArray responseBody;
ErrorCode errorCode = executeRequest(QString("%1v1/services"), apiPayload, responseBody);
qWarning() << "[ServicesCatalog] errorCode:" << static_cast<int>(errorCode)
<< "response:" << QString::fromLocal8Bit(responseBody);
if (errorCode == ErrorCode::NoError) {
if (!responseBody.contains(apiDefs::key::services.data())) {
errorCode = ErrorCode::ApiServicesMissingError;
@@ -241,7 +243,10 @@ ErrorCode ServicesCatalogController::fillAvailableServices(QJsonObject &services
ErrorCode ServicesCatalogController::executeRequest(const QString &endpoint, const QJsonObject &apiPayload, QByteArray &responseBody)
{
GatewayController gatewayController(m_appSettingsRepository->getGatewayEndpoint(), m_appSettingsRepository->isDevGatewayEnv(), apiDefs::requestTimeoutMsecs,
QString gatewayEndpoint = m_appSettingsRepository->getGatewayEndpoint();
qWarning() << "[ServicesCatalog] request URL:" << endpoint.arg(gatewayEndpoint)
<< "isDevEnv:" << m_appSettingsRepository->isDevGatewayEnv();
GatewayController gatewayController(gatewayEndpoint, m_appSettingsRepository->isDevGatewayEnv(), apiDefs::requestTimeoutMsecs,
m_appSettingsRepository->isStrictKillSwitchEnabled());
return gatewayController.post(endpoint, apiPayload, responseBody);
}
@@ -888,7 +888,9 @@ ErrorCode SubscriptionController::processPlayMarketPurchase(const QString &userC
checkPayload[apiDefs::key::transactionId] = purchaseToken;
QByteArray checkResponse;
qWarning() << "[Billing][processPlayMarketPurchase] v1/subscriptions request:" << QJsonDocument(checkPayload).toJson(QJsonDocument::Compact);
ErrorCode checkError = executeRequest(QString("%1v1/subscriptions"), checkPayload, checkResponse, false);
qWarning() << "[Billing][processPlayMarketPurchase] v1/subscriptions errorCode:" << static_cast<int>(checkError) << "response:" << checkResponse;
if (checkError != ErrorCode::NoError) {
qWarning().noquote() << "[Billing] Initial subscriptions check failed:" << static_cast<int>(checkError);
return checkError;
@@ -1083,7 +1085,9 @@ SubscriptionController::PlayMarketRestoreResult SubscriptionController::processP
checkPayload[apiDefs::key::transactionId] = purchaseToken;
QByteArray checkResponse;
qWarning() << "[Billing] v1/subscriptions request:" << QJsonDocument(checkPayload).toJson(QJsonDocument::Compact);
ErrorCode checkError = executeRequest(QString("%1v1/subscriptions"), checkPayload, checkResponse, false);
qWarning() << "[Billing] v1/subscriptions errorCode:" << static_cast<int>(checkError) << "response:" << checkResponse;
if (checkError != ErrorCode::NoError) {
qWarning().noquote() << "[Billing] Initial subscriptions check failed:" << static_cast<int>(checkError);
result.errorCode = checkError;
+30 -9
View File
@@ -6,8 +6,36 @@ Menu {
popupType: Popup.Native
onAboutToShow: blocker.enabled = true
onClosed: blocker.enabled = false
property Item inputBlocker: null
Component {
id: inputBlockerComponent
MouseArea {
anchors.fill: parent
preventStealing: true
}
}
onAboutToShow: {
if (!textObj || !textObj.window) {
return
}
const contentItem = textObj.window.contentItem
if (!inputBlocker) {
inputBlocker = inputBlockerComponent.createObject(contentItem)
} else {
inputBlocker.parent = contentItem
}
}
onClosed: {
if (inputBlocker) {
inputBlocker.destroy()
inputBlocker = null
}
}
MenuItem {
text: qsTr("C&ut")
@@ -31,11 +59,4 @@ Menu {
enabled: textObj.length > 0
onTriggered: textObj.selectAll()
}
MouseArea {
id: blocker
z: 2
enabled: false
preventStealing: true
}
}