diff --git a/sdk-intergration/.idea/.idea.sdk-intergration/.idea/.gitignore b/sdk-intergration/.idea/.idea.sdk-intergration/.idea/.gitignore
new file mode 100644
index 0000000..73e002a
--- /dev/null
+++ b/sdk-intergration/.idea/.idea.sdk-intergration/.idea/.gitignore
@@ -0,0 +1,13 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Rider ignored files
+/contentModel.xml
+/projectSettingsUpdater.xml
+/.idea.sdk-intergration.iml
+/modules.xml
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
+# Editor-based HTTP Client requests
+/httpRequests/
diff --git a/sdk-intergration/.idea/.idea.sdk-intergration/.idea/encodings.xml b/sdk-intergration/.idea/.idea.sdk-intergration/.idea/encodings.xml
new file mode 100644
index 0000000..df87cf9
--- /dev/null
+++ b/sdk-intergration/.idea/.idea.sdk-intergration/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/sdk-intergration/.idea/.idea.sdk-intergration/.idea/indexLayout.xml b/sdk-intergration/.idea/.idea.sdk-intergration/.idea/indexLayout.xml
new file mode 100644
index 0000000..7b08163
--- /dev/null
+++ b/sdk-intergration/.idea/.idea.sdk-intergration/.idea/indexLayout.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sdk-intergration/.idea/.idea.sdk-intergration/.idea/vcs.xml b/sdk-intergration/.idea/.idea.sdk-intergration/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/sdk-intergration/.idea/.idea.sdk-intergration/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sdk-intergration/Assets/Plugins.meta b/sdk-intergration/Assets/Plugins.meta
new file mode 100644
index 0000000..bc3d2ff
--- /dev/null
+++ b/sdk-intergration/Assets/Plugins.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: de38137d567d12045bbe1372bc888de6
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/sdk-intergration/Assets/Plugins/Android.meta b/sdk-intergration/Assets/Plugins/Android.meta
new file mode 100644
index 0000000..35362c4
--- /dev/null
+++ b/sdk-intergration/Assets/Plugins/Android.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 3fdee26ffb417244da1c9778ddaf7e90
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/sdk-intergration/Assets/Plugins/Android/AndroidManifest.xml b/sdk-intergration/Assets/Plugins/Android/AndroidManifest.xml
new file mode 100644
index 0000000..10a1048
--- /dev/null
+++ b/sdk-intergration/Assets/Plugins/Android/AndroidManifest.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sdk-intergration/Assets/Plugins/Android/AndroidManifest.xml.meta b/sdk-intergration/Assets/Plugins/Android/AndroidManifest.xml.meta
new file mode 100644
index 0000000..544dbed
--- /dev/null
+++ b/sdk-intergration/Assets/Plugins/Android/AndroidManifest.xml.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 339beab439a427b4b9e96b2accf2e146
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/sdk-intergration/Assets/Plugins/Android/gradleTemplate.properties b/sdk-intergration/Assets/Plugins/Android/gradleTemplate.properties
new file mode 100644
index 0000000..e8f66b5
--- /dev/null
+++ b/sdk-intergration/Assets/Plugins/Android/gradleTemplate.properties
@@ -0,0 +1,5 @@
+unityStreamingAssets=.unity3d**STREAMING_ASSETS**
+android.useAndroidX=true
+android.enableJetifier=true
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+android.suppressUnsupportedCompileSdk=33
diff --git a/sdk-intergration/Assets/Plugins/Android/gradleTemplate.properties.meta b/sdk-intergration/Assets/Plugins/Android/gradleTemplate.properties.meta
new file mode 100644
index 0000000..8d18021
--- /dev/null
+++ b/sdk-intergration/Assets/Plugins/Android/gradleTemplate.properties.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 86d31d9e59f392d4b8538e7dcf812ec3
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/sdk-intergration/Assets/Plugins/Android/mainTemplate.gradle b/sdk-intergration/Assets/Plugins/Android/mainTemplate.gradle
new file mode 100644
index 0000000..863fd67
--- /dev/null
+++ b/sdk-intergration/Assets/Plugins/Android/mainTemplate.gradle
@@ -0,0 +1,92 @@
+apply plugin: 'com.android.library'
+**APPLY_PLUGINS**
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+
+ api "com.android.support:support-v4:28.0.0"
+ api "com.android.support:appcompat-v7:28.0.0"
+
+ api "com.google.code.gson:gson:2.8.6"
+ api "com.squareup.okio:okio:1.15.0"
+ api "com.squareup.okhttp3:okhttp:3.12.13"
+ api "com.squareup.retrofit2:retrofit:2.3.0"
+ api "com.squareup.retrofit2:converter-gson:2.2.0"
+ api "com.squareup.retrofit2:adapter-rxjava:2.1.0"
+ api "io.reactivex:rxandroid:1.2.1"
+ api "io.reactivex:rxjava:1.1.9"
+
+ //GA依赖
+ // implementation 'com.tuyoo.component:growsdk-gasdk:2.4.22_0115-RELEASE'
+ implementation 'net.aihelp:android-aihelp-aar:4.6.+'
+
+ implementation 'com.google.android.gms:play-services-auth:20.2.0'
+ implementation('com.android.billingclient:billing:6.0.1')
+
+ implementation 'com.google.android.gms:play-services-basement:18.2.0'
+ implementation 'androidx.fragment:fragment:1.3.6'
+ implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.41"
+ implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.41'
+ implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41'
+ implementation 'org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.41'
+ implementation 'androidx.core:core:1.8.0'
+
+ implementation 'com.appsflyer:af-android-sdk:6.12.5'
+ implementation 'com.android.installreferrer:installreferrer:2.2'
+ implementation 'com.miui.referrer:homereferrer:1.0.0.6'
+
+ implementation platform('com.google.firebase:firebase-bom:32.7.4')
+ implementation 'com.google.firebase:firebase-analytics'
+
+ implementation('com.facebook.android:facebook-android-sdk:16.2.0')
+
+// Android Resolver Dependencies Start
+// implementation 'com.applovin:applovin-sdk:12.6.0'
+// Android Resolver Dependencies End
+**DEPS**}
+
+// Android Resolver Exclusions Start
+android {
+ packagingOptions {
+ exclude ('/lib/armeabi/*' + '*')
+ exclude ('/lib/mips/*' + '*')
+ exclude ('/lib/mips64/*' + '*')
+ exclude ('/lib/x86/*' + '*')
+ exclude ('/lib/x86_64/*' + '*')
+ }
+}
+// Android Resolver Exclusions End
+android {
+ ndkPath "**NDKPATH**"
+
+ compileSdkVersion **APIVERSION**
+ buildToolsVersion '**BUILDTOOLS**'
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
+ }
+
+ defaultConfig {
+ minSdkVersion **MINSDKVERSION**
+ targetSdkVersion **TARGETSDKVERSION**
+ ndk {
+ abiFilters **ABIFILTERS**
+ }
+ versionCode **VERSIONCODE**
+ versionName '**VERSIONNAME**'
+ consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
+ }
+
+ lintOptions {
+ abortOnError false
+ }
+
+ aaptOptions {
+ noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
+ ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
+ }**PACKAGING_OPTIONS**
+}
+**IL_CPP_BUILD_SETUP**
+**SOURCE_BUILD_SETUP**
+**EXTERNAL_SOURCES**
diff --git a/sdk-intergration/Assets/Plugins/Android/mainTemplate.gradle.meta b/sdk-intergration/Assets/Plugins/Android/mainTemplate.gradle.meta
new file mode 100644
index 0000000..4dd0559
--- /dev/null
+++ b/sdk-intergration/Assets/Plugins/Android/mainTemplate.gradle.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: edc76530d8406f74787197e56949feb3
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/sdk-intergration/Assets/Plugins/Android/settingsTemplate.gradle b/sdk-intergration/Assets/Plugins/Android/settingsTemplate.gradle
new file mode 100644
index 0000000..25391fb
--- /dev/null
+++ b/sdk-intergration/Assets/Plugins/Android/settingsTemplate.gradle
@@ -0,0 +1,32 @@
+pluginManagement {
+ repositories {
+ **ARTIFACTORYREPOSITORY**
+ gradlePluginPortal()
+ google()
+ mavenCentral()
+ }
+}
+
+include ':launcher', ':unityLibrary'
+**INCLUDES**
+
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
+ repositories {
+ **ARTIFACTORYREPOSITORY**
+ google()
+ mavenCentral()
+// Android Resolver Repos Start
+ def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
+ mavenLocal()
+// Android Resolver Repos End
+ flatDir {
+ dirs "${project(':unityLibrary').projectDir}/libs"
+ }
+
+ maven {
+ url "http://sdkck.tuyoo.com/artifactory/tuyoo-component/"
+ allowInsecureProtocol = true
+ }
+ }
+}
diff --git a/sdk-intergration/Assets/Plugins/Android/settingsTemplate.gradle.meta b/sdk-intergration/Assets/Plugins/Android/settingsTemplate.gradle.meta
new file mode 100644
index 0000000..458d615
--- /dev/null
+++ b/sdk-intergration/Assets/Plugins/Android/settingsTemplate.gradle.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: d2f880703e7cd08469817aea47e80830
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/sdk-intergration/Packages/tysdk/Plugins/Android/ConfigManager.java b/sdk-intergration/Packages/tysdk/Plugins/Android/ConfigManager.java
new file mode 100644
index 0000000..0b3e05e
--- /dev/null
+++ b/sdk-intergration/Packages/tysdk/Plugins/Android/ConfigManager.java
@@ -0,0 +1,29 @@
+
+package com.unity3d.player;
+
+public class ConfigManager {
+ //通用参数
+ public static int SDK_APPID = 20587;
+ public static String SDK_GAMEID = "20587";
+ public static String SDK_PROJECTID = "20587";
+ public static String SDK_CLOUDID = "128";
+ public static String SDK_CLIENTID = "Android_5.00_tyGuest,facebook.googleplay.0-hall20587.googleplay.FishingMaster";
+
+ public static String SDK_LOGIN_SERVER_URL = "https://128-hwsfsdk-sdk-online01.qijihdhk.com";
+
+ // 防沉迷 - nameSpace
+ public static String FCM_NAMESPACE = "128";
+ // 防沉迷 - 长连接服务地址+端口
+ public static String FCM_IAM_HOST = "tcp://fcmtcp.tuyoo.com:3563";
+ // 防沉迷 - 防沉迷服务地址
+ public static String FCM_ANTISERVERURL = "https://fcmapi.tuyoo.com";
+
+
+ public static final String UNITY_FACADE_NAME = "TYSdkFacade";
+ public static final String LOGIN_CALLBACK_FUNCTION_NAME = "LoginResult";
+ public static final String PAY_CALLBACK_FUNCTION_NAME = "PayResult";
+ public static final String PAY_TYPE_CALLBACK_FUNCTION_NAME = "PayTypeResult";
+ public static final String FCM_NOTICE_FUNCTION_NAME = "FCMCallback";
+ public static final String FCM_REALNAME_CALLBACK_FUNCTION_NAME = "RealNameCallback";
+
+}
diff --git a/sdk-intergration/Packages/tysdk/Plugins/Android/ConfigManager.java.meta b/sdk-intergration/Packages/tysdk/Plugins/Android/ConfigManager.java.meta
new file mode 100644
index 0000000..2235402
--- /dev/null
+++ b/sdk-intergration/Packages/tysdk/Plugins/Android/ConfigManager.java.meta
@@ -0,0 +1,32 @@
+fileFormatVersion: 2
+guid: 1db5fda501403f6488b08a37aebd8a80
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/sdk-intergration/Packages/tysdk/Plugins/Android/SDKManager.java b/sdk-intergration/Packages/tysdk/Plugins/Android/SDKManager.java
new file mode 100644
index 0000000..bcf2844
--- /dev/null
+++ b/sdk-intergration/Packages/tysdk/Plugins/Android/SDKManager.java
@@ -0,0 +1,303 @@
+
+package com.unity3d.player;
+
+import android.app.Activity;
+import android.os.Handler;
+import android.os.Looper;
+import android.text.TextUtils;
+import android.util.Log;
+
+//import com.barton.log.GASDKFactory;
+//import com.barton.log.builder.GAConfiguration;
+//import com.barton.log.builder.ParamsBuilder;
+//import com.barton.log.ebarton.BaseUrl;
+//import com.barton.log.ebarton.EventType;
+//import com.barton.log.logapi.IGASDK;
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+import com.tuyoo.gamesdk.api.SDKAPI;
+import com.tuyoo.gamesdk.api.SDKCallBack;
+import com.tuyoo.gamesdk.api.SDKWrapper;
+import com.tuyoo.gamesdk.api.TuYooClientID;
+import com.tuyoo.gamesdk.event.EventBus;
+import com.tuyoo.gamesdk.event.EventConsts;
+import com.tuyoo.gamesdk.event.data.PayEventData;
+import com.tuyoo.gamesdk.event.data.WeixinShareData;
+import com.tuyoo.gamesdk.model.InitParam;
+import com.tuyoo.gamesdk.pay.model.PayType;
+import com.tuyoo.gamesdk.util.SDKLog;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class SDKManager {
+
+ private final static Handler handler = new Handler(Looper.getMainLooper());
+ // private static IGASDK gasdk;
+ private static final String TAG = com.unity3d.player.SDKManager.class.getSimpleName();
+ private static String curType = TuYooClientID.tyGuest;
+ public static void InitSDK(Activity activity)
+ {
+ Log.e(TAG,"SDKManager:::InitSDK");
+ Log.e(TAG,"SDK_APPID:::" + ConfigManager.SDK_APPID);
+ Log.e(TAG,"SDK_CLIENTID:::" + ConfigManager.SDK_CLIENTID);
+ Log.e(TAG,"SDK_LOGIN_SERVER_URL:::" + ConfigManager.SDK_LOGIN_SERVER_URL);
+ activity.runOnUiThread(() -> {
+ SDKAPI.getIns().lightModeEnable();
+ try {
+ SDKAPI.getIns().init(new InitParam.Builder()
+ .withActivity(activity)
+ .withAppId(ConfigManager.SDK_APPID)
+ .withClientId(ConfigManager.SDK_CLIENTID)
+ .withServerUrl(ConfigManager.SDK_LOGIN_SERVER_URL)
+ .build());
+ TYUnityActivity.setSdkInited();
+ SDKAPI.getIns().onActivityStart(activity);
+ SDKAPI.getIns().onActivityResume(activity);
+ } catch (Exception e) {
+ System.out.println("initSDK Exception " + e);
+ }
+ });
+ }
+
+
+ public static void parseLoginInfo(int i, String s) {
+ Log.e(TAG,"parseLoginInfo!!" );
+ try {
+ JSONObject result = new JSONObject();
+ result.put("code", i);
+ if (i == 0) {
+ JSONObject serverResponse = new JSONObject(s);
+ JSONObject userInfo = serverResponse.getJSONObject("result");
+ JSONObject userInfoReorganization = new JSONObject();
+ userInfoReorganization.put("userId", userInfo.optString("userId"));
+ userInfoReorganization.put("authorCode", userInfo.optString("authorCode"));
+ userInfoReorganization.put("token", userInfo.optString("token"));
+ userInfoReorganization.put("jwttoken", userInfo.optString("jwttoken"));
+ JSONObject userInfoResult = new JSONObject();
+ userInfoResult.put("result", userInfoReorganization);
+ result.put("respObj", userInfoResult);
+
+ Log.e(TAG,"userId:::::" + userInfo.optString("userId"));
+ Log.e(TAG,"token:::::" + userInfo.optString("token"));
+ } else {
+ Log.e(TAG,"errStr:::::" +s);
+ result.put("errStr", s);
+ Log.e(TAG,"errStrInfo:::::" +result.toString());
+ }
+
+ UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.LOGIN_CALLBACK_FUNCTION_NAME, result.toString());
+ } catch (Exception e) {
+ Log.e(TAG,"SDKManager-parseLoginInfo-Exception" + e);
+ SDKLog.e("SDKManager-parseLoginInfo-Exception" + e);
+ UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.LOGIN_CALLBACK_FUNCTION_NAME, "{\"code\":1}}");
+ }
+ }
+
+ //登录回调-统一的回调方法(保持回调仅有一个,否则可能会出现多次回调的情况)
+ static SDKCallBack.Login mLogin = new SDKCallBack.Login() {
+ @Override
+ public void callback(int i, String s) {
+ SDKLog.i("SDKCallBack.Login callback: " + i + " \n" + s);
+ parseLoginInfo(i, s);
+ }
+ };
+
+ static SDKCallBack.Pay mPay = new SDKCallBack.Pay() {
+ @Override
+ public void callback(int i, String s) {
+
+ Log.e(TAG,"SDKCallBack.Pay callback: " + i + " \n" + s);
+ SDKLog.i("SDKCallBack.Pay callback: " + i + " \n" + s);
+ try {
+ JSONObject result = new JSONObject();
+ result.put("code", i);
+ result.put("respObj", s);
+ result.put("errStr", s);
+ UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.PAY_CALLBACK_FUNCTION_NAME, result.toString());
+ } catch (Exception e) {
+ Log.e(TAG,"SDKManager-SDKCallBack.Pay-Exception" + e);
+ SDKLog.e("SDKManager-SDKCallBack.Pay-Exception" + e);
+ UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.PAY_CALLBACK_FUNCTION_NAME, "{\"code\":1}}");
+ }
+ }
+ };
+
+ public static void UnityResetServerUrl(String url) {
+ SDKLog.i("UnityResetServerUrl : " + url);
+ SDKAPI.getIns().updateServer(url);
+ }
+
+ public static void UnityLoginByTokenFun(String token) {
+ SDKLog.i("UnityLoginByTokenFun : " + token);
+ handler.post(new Runnable() {
+ @Override
+ public void run() {
+ SDKAPI.getIns().loginByToken(token, mLogin);
+ }
+ });
+ }
+
+ public static void UnityGetIdentityFun(String type) {
+ curType = type;
+ Log.e(TAG,"UnityGetIdentityFun : " + type);
+ SDKLog.i("UnityGetIdentityFun : " + type);
+ handler.post(new Runnable() {
+ @Override
+ public void run() {
+ SDKAPI.getIns().loginByType(type, mLogin);
+ }
+ });
+ }
+
+ public static void UnityLoginOut() {
+// Log.e(TAG,"UnityLoginOut!!!");
+ SDKLog.i("UnityLoginOut : ");
+ handler.post(() -> SDKAPI.getIns().logout(curType));
+ }
+
+ public static void UnityKnow(String userId, String productId, String productPrice, String productName, String productCount, String prodorderId, String appInfo) {
+ SDKLog.i("UnityKnow : " + productId);
+ HashMap extraInfo = new HashMap();
+ extraInfo.put("appInfo", appInfo);
+ SDKAPI.getIns().pay(productId, productName, productCount, Integer.parseInt(ConfigManager.SDK_GAMEID), mPay, prodorderId, extraInfo);
+ }
+
+ public static void UnityGetKnowTypeList(String productId)
+ {
+ Log.e(TAG,"UnityGetKnowTypeList:" + productId );
+ final PayEventData.PayReq mPayReq = new PayEventData.PayReq();
+ mPayReq.prodId = productId;
+ SDKAPI.getIns().charge(mPayReq , new SDKCallBack.Base1() {
+ @Override
+ public void callback(int code, String msg) {
+ SDKLog.e("====> code= " + code + " msg= " + msg);
+ try {
+ JSONObject result = new JSONObject();
+ result.put("code", code);
+ if(code == 0){
+ result.put("respObj", msg);
+ }else {
+ result.put("errStr", msg);
+ }
+ UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.PAY_TYPE_CALLBACK_FUNCTION_NAME, result.toString());
+ } catch (Exception e) {
+ SDKLog.e("SDKManager-UnityGetKnowTypeList-Exception" + e);
+ UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.PAY_TYPE_CALLBACK_FUNCTION_NAME, "{\"code\":1}}");
+ }
+ }
+ });
+ }
+
+ public static void UnityKnowNew(String productId, String productPrice, String productName, String productCount, String prodorderId, String appInfo, String ptype)
+ {
+ Log.e(TAG,"开始支付-----"+ "productId:" + productId+" "+ "productPrice:" + productPrice+" "+ "productName:" + productName +" "+ "prodorderId:" + prodorderId +" "+ "appInfo:" + appInfo +" "+ "ptype:" + ptype);
+
+ PayEventData.PayData payData = new PayEventData.PayData();
+ final PayEventData.PayReq mPayReq = new PayEventData.PayReq();
+ mPayReq.prodId = productId;
+ mPayReq.prodPrice = productPrice;
+ mPayReq.prodName = productName;
+ mPayReq.prodCount = productCount;
+ // 此字段与服务端回调接口内的appInfo不对应,与orderId相对应
+ mPayReq.appInfo = prodorderId;
+ HashMap map = new HashMap();
+ // 此字段(appInfo)可用于传递透传信息(此信息与服务端回调接口内的appInfo相对应)
+ map.put("appInfo", appInfo);
+ mPayReq.extra = map;
+ payData.payReq = mPayReq;
+ PayType payType = new PayType();
+ payType.paytype = ptype;
+ SDKAPI.getIns().payNew(payData, payType, mPay);
+ }
+
+
+ public static void thirdExtend()
+ {
+ Log.e(TAG,"====>java thirdExtend");
+ JSONObject jsonObject = new JSONObject();
+ try {
+ jsonObject.put("action","ACTION_GET_SKU_DETAILS_LIST");
+ } catch (JSONException e) {
+ throw new RuntimeException(e);
+ }
+ SDKAPI.getIns().thirdExtend(jsonObject.toString(), new SDKCallBack.Extend() {
+ @Override public void callback(int code, String msg) {
+
+ Log.e(TAG,"====>thirdExtend code= " + code + " msg= " + msg );
+ try {
+ //获取成功,msg即为对应的json字符串
+ JSONObject result = new JSONObject();
+ result.put("code", code);
+ if(code == SDKCallBack.Extend.EXTEND_CODE_SUCCESS){
+ result.put("respObj", msg);
+ }else {
+ Log.e(TAG,"获取商品列表失败啦:" + msg);
+ result.put("thirdExtend_errStr", msg);
+ }
+ UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.PAY_TYPE_CALLBACK_FUNCTION_NAME, result.toString());
+ } catch (Exception e) {
+ SDKLog.e("SDKManager-UnityGetKnowTypeList-Exception" + e);
+ UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME, ConfigManager.PAY_TYPE_CALLBACK_FUNCTION_NAME, "{\"code\":1}}");
+ }
+ }
+ });
+ }
+
+// private static IGASDK GetGameGa(){
+// if(gasdk == null){
+// GAConfiguration.Builder builder = new GAConfiguration.Builder()
+// .withBaseUrl(BaseUrl.INTERNAL)
+// .withContext(SDKWrapper.getInstance().getContext())
+// .withClientId(ConfigManager.SDK_CLIENTID)
+// .withGameId(ConfigManager.SDK_GAMEID)
+// .withProjectId(ConfigManager.SDK_PROJECTID);
+// gasdk = GASDKFactory.createGASDK(builder.build());
+// }
+// return gasdk;
+// }
+
+ public static void SetGaUserInfo(String userId)
+ {
+// Log.e(TAG,"SetGaUserInfo : " + userId);
+// SDKLog.i("SetGaUserInfo : " + userId);
+// GetGameGa().setUserId(userId);
+ }
+
+ public static void SetGaCommonInfo(String SetGaCommonInfo)
+ {
+// Log.e(TAG,"SetGaCommonInfo : " + SetGaCommonInfo);
+// SDKLog.i("SetGaCommonInfo : " + SetGaCommonInfo);
+// Gson gson = new Gson();
+// Map map = gson.fromJson(SetGaCommonInfo, new TypeToken