diff --git a/client/android/billing/src/main/kotlin/BillingProvider.kt b/client/android/billing/src/main/kotlin/BillingProvider.kt index 4893eb30f..94dce9421 100644 --- a/client/android/billing/src/main/kotlin/BillingProvider.kt +++ b/client/android/billing/src/main/kotlin/BillingProvider.kt @@ -237,6 +237,7 @@ class BillingProvider(context: Context) : AutoCloseable { private fun processPurchases(purchases: List?): JSONArray { val purchaseArray = JSONArray() purchases?.forEach { purchase -> + Log.v(TAG, "processPurchases: purchaseToken=${purchase.purchaseToken} orderId=${purchase.orderId} state=${purchase.purchaseState}") /* val purchaseJson = */ JSONObject().also { purchaseArray.put(it) } .put("purchaseToken", purchase.purchaseToken) .put("purchaseTime", purchase.purchaseTime) diff --git a/client/core/controllers/api/servicesCatalogController.cpp b/client/core/controllers/api/servicesCatalogController.cpp index e54d749fc..18f387a01 100644 --- a/client/core/controllers/api/servicesCatalogController.cpp +++ b/client/core/controllers/api/servicesCatalogController.cpp @@ -217,6 +217,12 @@ ErrorCode ServicesCatalogController::fillAvailableServices(QJsonObject &services apiPayload[apiDefs::key::appVersion] = QString(APP_VERSION); apiPayload[apiDefs::key::cliName] = QString(APPLICATION_NAME); apiPayload[apiDefs::key::appLanguage] = m_appSettingsRepository->getAppLanguage().name().split("_").first(); +#if defined(Q_OS_ANDROID) + apiPayload[apiDefs::key::market] = QStringLiteral("playmarket"); +#else + apiPayload[apiDefs::key::market] = QStringLiteral("appstore"); +#endif + QByteArray responseBody; ErrorCode errorCode = executeRequest(QString("%1v1/services"), apiPayload, responseBody); diff --git a/client/core/controllers/api/subscriptionController.cpp b/client/core/controllers/api/subscriptionController.cpp index 45a9e1e9a..4ed374f47 100644 --- a/client/core/controllers/api/subscriptionController.cpp +++ b/client/core/controllers/api/subscriptionController.cpp @@ -1085,9 +1085,9 @@ SubscriptionController::PlayMarketRestoreResult SubscriptionController::processP checkPayload[apiDefs::key::transactionId] = purchaseToken; QByteArray checkResponse; - qWarning() << "[Billing] v1/subscriptions request:" << QJsonDocument(checkPayload).toJson(QJsonDocument::Compact); + qWarning() << "[Billing][processPlayMarketRestore] v1/subscriptions request:" << QJsonDocument(checkPayload).toJson(QJsonDocument::Compact); ErrorCode checkError = executeRequest(QString("%1v1/subscriptions"), checkPayload, checkResponse, false); - qWarning() << "[Billing] v1/subscriptions errorCode:" << static_cast(checkError) << "response:" << checkResponse; + qWarning() << "[Billing][processPlayMarketRestore] v1/subscriptions errorCode:" << static_cast(checkError) << "response:" << checkResponse; if (checkError != ErrorCode::NoError) { qWarning().noquote() << "[Billing] Initial subscriptions check failed:" << static_cast(checkError); result.errorCode = checkError; diff --git a/client/core/utils/constants/apiKeys.h b/client/core/utils/constants/apiKeys.h index 46833706c..cbee6f31f 100644 --- a/client/core/utils/constants/apiKeys.h +++ b/client/core/utils/constants/apiKeys.h @@ -40,6 +40,7 @@ namespace apiDefs constexpr QLatin1String lastDownloaded("last_downloaded"); constexpr QLatin1String sourceType("source_type"); constexpr QLatin1String appLanguage("app_language"); + constexpr QLatin1String market("market"); constexpr QLatin1String activeDeviceCount("active_device_count"); constexpr QLatin1String maxDeviceCount("max_device_count");