update:ChannelConfig 更新
This commit is contained in:
Binary file not shown.
8
ChannelConfigs/Android/rustore/AndroidManifest.xml
Normal file
8
ChannelConfigs/Android/rustore/AndroidManifest.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<application tools:overrideLibrary="com.tuyoo.gamesdk">
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,13 @@
|
||||
dependencies {
|
||||
implementation(platform("ru.rustore.sdk:bom:2025.11.01"))
|
||||
implementation("ru.rustore.sdk:pay")
|
||||
implementation "ru.rustore.sdk:review:10.0.0"
|
||||
implementation "com.vk.id:vkid:2.5.1"
|
||||
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.2"
|
||||
}
|
||||
|
||||
android {
|
||||
compileOptions {
|
||||
coreLibraryDesugaringEnabled true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
maven {
|
||||
url "https://artifactory-external.vkpartner.ru/artifactory/vkid-sdk-android/"
|
||||
}
|
||||
maven {
|
||||
url "https://artifactory-external.vkpartner.ru/artifactory/maven/"
|
||||
}
|
||||
maven {
|
||||
url "https://artifactory-external.vkpartner.ru/artifactory/vk-id-captcha/android/"
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
46
ChannelConfigs/Android/rustore/RustoreAdapter.java
Normal file
46
ChannelConfigs/Android/rustore/RustoreAdapter.java
Normal file
@@ -0,0 +1,46 @@
|
||||
package com.unity3d.player;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class RustoreAdapter extends ChannelAdapterBase {
|
||||
private static final String TAG = "RustoreAdapter";
|
||||
|
||||
@Override
|
||||
public String normalizeSkuList(String msg) {
|
||||
if (msg == null || msg.isEmpty()) {
|
||||
return msg;
|
||||
}
|
||||
|
||||
try {
|
||||
JSONArray products = new JSONArray(msg);
|
||||
for (int i = 0; i < products.length(); i++) {
|
||||
JSONObject p = products.getJSONObject(i);
|
||||
|
||||
String price = p.optString("price", "0");
|
||||
long micros = Long.parseLong(price) * 10000;
|
||||
p.put("price_amount_micros", String.valueOf(micros));
|
||||
|
||||
String currency = p.optString("currency", "");
|
||||
if (!currency.isEmpty()) {
|
||||
p.put("price_currency_code", currency);
|
||||
}
|
||||
|
||||
float rubles = Float.parseFloat(price) / 100;
|
||||
p.put("price", String.format(Locale.US, "RUB %.2f", rubles));
|
||||
}
|
||||
return products.toString();
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "normalizeSkuList error: " + e.getMessage());
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
|
||||
private static class Config {
|
||||
public String SDK_CLIENTID = "Android_5.00_tyGuest,facebook.googleplay.0-hall20587.rustore.FishingTravel";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user