com.xd.sdk.payment 0.0.1 → 0.0.10-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/Plugins/Android/libs/XDGPaymentUPPay_7.0.0.aar +0 -0
  2. package/Plugins/Android/libs/{XDGPayment_6.21.1.aar.meta → XDGPaymentUPPay_7.0.0.aar.meta} +2 -2
  3. package/Plugins/Android/libs/XDGPayment_7.0.0.aar +0 -0
  4. package/Plugins/Android/libs/XDGPayment_7.0.0.aar.meta +32 -0
  5. package/Plugins/Android/libs.meta +1 -1
  6. package/Plugins/Android.meta +1 -1
  7. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGOrderInfo.h +9 -9
  8. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGOrderInfo.h.meta +1 -1
  9. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPayment.h +12 -57
  10. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPayment.h.meta +1 -1
  11. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPaymentDefines.h +49 -0
  12. package/{README.md.meta → Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPaymentDefines.h.meta} +2 -2
  13. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPaymentParams.h +43 -0
  14. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPaymentParams.h.meta +7 -0
  15. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPaymentService.h +11 -8
  16. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPaymentService.h.meta +1 -1
  17. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPaymentVersion.h +3 -2
  18. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPaymentVersion.h.meta +1 -1
  19. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPendingPurchase.h +18 -0
  20. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPendingPurchase.h.meta +7 -0
  21. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGProductInfo.h +29 -2
  22. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGProductInfo.h.meta +1 -1
  23. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGTransactionInfo.h +7 -3
  24. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGTransactionInfo.h.meta +1 -1
  25. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDPaymentSDK.h +2 -1
  26. package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDPaymentSDK.h.meta +1 -1
  27. package/Plugins/iOS/XDPaymentSDK.framework/Headers.meta +1 -1
  28. package/Plugins/iOS/XDPaymentSDK.framework/Info.plist +0 -0
  29. package/Plugins/iOS/XDPaymentSDK.framework/Info.plist.meta +1 -1
  30. package/Plugins/iOS/XDPaymentSDK.framework/Modules/module.modulemap.meta +1 -1
  31. package/Plugins/iOS/XDPaymentSDK.framework/Modules.meta +1 -1
  32. package/Plugins/iOS/XDPaymentSDK.framework/XDPaymentSDK +0 -0
  33. package/Plugins/iOS/XDPaymentSDK.framework/XDPaymentSDK.meta +1 -1
  34. package/Plugins/iOS/XDPaymentSDK.framework.meta +56 -3
  35. package/Plugins/iOS.meta +1 -1
  36. package/Plugins.meta +1 -1
  37. package/{Mobile → Runtime/Internal/Mobile}/PaymentConstants.cs +5 -8
  38. package/{Mobile/Editor/XDPaymentMobileProcessBuild.cs.meta → Runtime/Internal/Mobile/PaymentConstants.cs.meta} +1 -1
  39. package/Runtime/Internal/Mobile/PaymentFeaturesImpl.cs +185 -0
  40. package/{Editor/XDGAndroidPaymentProcessor.cs.meta → Runtime/Internal/Mobile/PaymentFeaturesImpl.cs.meta} +1 -1
  41. package/Runtime/Internal/Mobile/XDGRestoredPurchasesWrapper.cs +23 -0
  42. package/{Mobile → Runtime/Internal/Mobile}/XDGRestoredPurchasesWrapper.cs.meta +1 -1
  43. package/{Mobile.meta → Runtime/Internal/Mobile.meta} +1 -1
  44. package/Runtime/Internal/Standalone/AliyunTrack.Payment.cs +156 -0
  45. package/{Mobile/XDGDataBean.cs.meta → Runtime/Internal/Standalone/AliyunTrack.Payment.cs.meta} +1 -1
  46. package/Runtime/Internal/Standalone/Bean/PayCheckResponse.cs +19 -0
  47. package/{Editor/XDPaymentProcessBuild.cs.meta → Runtime/Internal/Standalone/Bean/PayCheckResponse.cs.meta} +1 -1
  48. package/Runtime/Internal/Standalone/Bean/PayInfo.cs +31 -0
  49. package/Runtime/Internal/Standalone/Bean/PayInfo.cs.meta +11 -0
  50. package/Runtime/Internal/Standalone/Bean/QueryProductsResponse.cs +46 -0
  51. package/Runtime/Internal/Standalone/Bean/QueryProductsResponse.cs.meta +11 -0
  52. package/Runtime/Internal/Standalone/Bean/XDGRefundResultWrapper.cs +19 -0
  53. package/Runtime/Internal/Standalone/Bean/XDGRefundResultWrapper.cs.meta +11 -0
  54. package/{Editor/XD.SDK.Payment.Editor.asmdef.meta → Runtime/Internal/Standalone/Bean.meta} +3 -2
  55. package/Runtime/Internal/Standalone/PayListener.cs +83 -0
  56. package/Runtime/Internal/Standalone/PayListener.cs.meta +11 -0
  57. package/Runtime/Internal/Standalone/PayModule.cs +261 -0
  58. package/Runtime/Internal/Standalone/PayModule.cs.meta +11 -0
  59. package/Runtime/Internal/Standalone/PaymentAlert.cs +112 -0
  60. package/Runtime/Internal/Standalone/PaymentAlert.cs.meta +11 -0
  61. package/Runtime/Internal/Standalone/PaymentFeaturesImpl.cs +238 -0
  62. package/Runtime/Internal/Standalone/PaymentFeaturesImpl.cs.meta +11 -0
  63. package/{Mobile/Editor.meta → Runtime/Internal/Standalone.meta} +1 -1
  64. package/Runtime/Internal/XDGPaymentInternal.cs +46 -0
  65. package/Runtime/Internal/XDGPaymentInternal.cs.meta +11 -0
  66. package/Runtime/{XDGRefundDetails.cs → Internal/XDGRefundDetails.cs} +3 -5
  67. package/Runtime/Internal/XDGRefundDetails.cs.meta +11 -0
  68. package/Runtime/{XDGRefundResultWrapper.cs → Internal/XDGRefundResultWrapper.cs} +1 -1
  69. package/Runtime/Internal/XDGRefundResultWrapper.cs.meta +11 -0
  70. package/{Editor.meta → Runtime/Internal.meta} +1 -1
  71. package/Runtime/Public/XDGPayment.Deprecated.cs +231 -0
  72. package/Runtime/Public/XDGPayment.Deprecated.cs.meta +11 -0
  73. package/Runtime/Public/XDGPayment.cs +97 -0
  74. package/Runtime/Public/XDGPayment.cs.meta +11 -0
  75. package/Runtime/Public/XDGPaymentEventHandler.cs +34 -0
  76. package/Runtime/Public/XDGPaymentEventHandler.cs.meta +3 -0
  77. package/Runtime/Public.meta +8 -0
  78. package/Runtime/XD.SDK.Payment.asmdef +5 -2
  79. package/Runtime/XD.SDK.Payment.asmdef.meta +6 -2
  80. package/Runtime.meta +7 -2
  81. package/package.json +5 -5
  82. package/package.json.meta +2 -2
  83. package/Editor/XD.SDK.Payment.Editor.asmdef +0 -19
  84. package/Editor/XDGAndroidPaymentProcessor.cs +0 -44
  85. package/Editor/XDPaymentProcessBuild.cs +0 -18
  86. package/Mobile/Editor/XD.SDK.Payment.Mobile.Editor.asmdef +0 -20
  87. package/Mobile/Editor/XD.SDK.Payment.Mobile.Editor.asmdef.meta +0 -7
  88. package/Mobile/Editor/XDPaymentMobileProcessBuild.cs +0 -20
  89. package/Mobile/PaymentConstants.cs.meta +0 -3
  90. package/Mobile/XD.SDK.Payment.Mobile.asmdef +0 -22
  91. package/Mobile/XD.SDK.Payment.Mobile.asmdef.meta +0 -7
  92. package/Mobile/XDGDataBean.cs +0 -242
  93. package/Mobile/XDGPaymentDetailsParam.cs +0 -127
  94. package/Mobile/XDGPaymentDetailsParam.cs.meta +0 -3
  95. package/Mobile/XDGPaymentMobile.cs +0 -132
  96. package/Mobile/XDGPaymentMobile.cs.meta +0 -11
  97. package/Mobile/XDGPaymentMobileImpl.cs +0 -331
  98. package/Mobile/XDGPaymentMobileImpl.cs.meta +0 -11
  99. package/Mobile/XDGRestoredPurchasesWrapper.cs +0 -42
  100. package/Plugins/Android/libs/XDGPayment_6.21.1.aar +0 -0
  101. package/README.md +0 -0
  102. package/Runtime/IXDGPayment.cs +0 -38
  103. package/Runtime/IXDGPayment.cs.meta +0 -3
  104. package/Runtime/WebPayResultType.cs +0 -8
  105. package/Runtime/WebPayResultType.cs.meta +0 -3
  106. package/Runtime/XDGPayType.cs +0 -8
  107. package/Runtime/XDGPayType.cs.meta +0 -3
  108. package/Runtime/XDGPayment.cs +0 -101
  109. package/Runtime/XDGPayment.cs.meta +0 -3
  110. package/Runtime/XDGRefundDetails.cs.meta +0 -3
  111. package/Runtime/XDGRefundResultWrapper.cs.meta +0 -3
  112. package/Runtime/XDGSkuDetailInfo.cs +0 -252
  113. package/Runtime/XDGSkuDetailInfo.cs.meta +0 -3
@@ -1,38 +0,0 @@
1
- using System;
2
- using System.Collections.Generic;
3
-
4
- namespace XD.SDK.Payment
5
- {
6
- public interface IXDGPayment
7
- {
8
- void PayWithProduct(string orderId, string productId, string roleId, string serverId, string ext,
9
- Action<XDGOrderInfoWrapper> callback);
10
-
11
- void PayWithWeb(
12
- string orderId,
13
- string productId,
14
- string productName,
15
- double payAmount,
16
- string roleId,
17
- string serverId,
18
- string extras,
19
- Action<WebPayResultType, string> callback);
20
-
21
- void QueryWithProductIds(string[] productIds, Action<XDGSkuDetailInfo> callback);
22
-
23
- void QueryRestoredPurchase(Action<List<XDGRestoredPurchase>> callback);
24
-
25
- void RestorePurchase(string purchaseToken, string orderId, string productId, string roleId,
26
- string serverId, string ext, Action<XDGOrderInfoWrapper> callback);
27
-
28
- void CheckRefundStatus(Action<XDGRefundResultWrapper> callback);
29
-
30
- void CheckRefundStatusWithUI(Action<XDGRefundResultWrapper> callback);
31
-
32
- void PayWithUI(string orderId, string productId, string productName, double payAmount,
33
- string roleId, string serverId, string ext, Action<XDGOrderInfoWrapper> callback);
34
-
35
- void Pay(PayType payTtoe, string orderId, string productId, string productName, double payAmount,
36
- string roleId, string serverId, string ext, Action<XDGOrderInfoWrapper> callback);
37
- }
38
- }
@@ -1,3 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 3f962142a0db4e6eb5fa5ae8d3ee08f7
3
- timeCreated: 1672758200
@@ -1,8 +0,0 @@
1
- namespace XD.SDK.Payment{
2
- public enum WebPayResultType{
3
- OK = 0,
4
- Cancel = 1,
5
- Processing = 2,
6
- Error = -1,
7
- }
8
- }
@@ -1,3 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 3347852d5ef3495f93d82eb2cc9c7f69
3
- timeCreated: 1655709657
@@ -1,8 +0,0 @@
1
- namespace XD.SDK.Payment
2
- {
3
- public enum PayType
4
- {
5
- Alipay,
6
- WechatPay,
7
- }
8
- }
@@ -1,3 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: e0df2e63d0f4405aabe2cee7bc602780
3
- timeCreated: 1686564907
@@ -1,101 +0,0 @@
1
- using System;
2
- using System.Collections.Generic;
3
- using System.Linq;
4
- using TapTap.Common;
5
- using UnityEngine;
6
- using UnityEngine.Scripting;
7
- using XD.SDK.Payment;
8
-
9
- [assembly: Preserve]
10
- [assembly: AlwaysLinkAssembly]
11
- namespace XD.SDK.Payment{
12
- public class XDGPayment{
13
- public static IXDGPayment platformWrapper;
14
-
15
- static XDGPayment()
16
- {
17
- var interfaceType = typeof(IXDGPayment);
18
- var platformInterfaceType = AppDomain.CurrentDomain.GetAssemblies()
19
- .SelectMany(assembly => assembly.GetTypes())
20
- .FirstOrDefault(clazz => interfaceType.IsAssignableFrom(clazz)&& clazz.IsClass);
21
- if (platformInterfaceType != null) {
22
- platformWrapper = Activator.CreateInstance(platformInterfaceType) as IXDGPayment;
23
- }
24
- else
25
- {
26
- TapLogger.Error($"No class implements {interfaceType} Type. Current Platform: {Application.platform}, if you are using Editor, please check if you have installed XDSDK pc module.");
27
- }
28
- }
29
-
30
- public static void PayWithProduct(string orderId, string productId, string roleId, string serverId, string ext,
31
- Action<XDGOrderInfoWrapper> callback){
32
- platformWrapper.PayWithProduct(orderId, productId, roleId, serverId, ext, callback);
33
- }
34
-
35
- public static void PayWithWeb(
36
- string orderId,
37
- string productId,
38
- string productName,
39
- double payAmount,
40
- string roleId,
41
- string serverId,
42
- string extras,
43
- Action<WebPayResultType, string> callback){
44
- platformWrapper.PayWithWeb(orderId, productId, productName, payAmount, roleId, serverId, extras, callback);
45
- }
46
-
47
- public static void QueryWithProductIds(string[] productIds, Action<XDGSkuDetailInfo> callback){
48
- platformWrapper.QueryWithProductIds(productIds, callback);
49
- }
50
-
51
- public static void QueryRestoredPurchase(Action<List<XDGRestoredPurchase>> callback){
52
- platformWrapper.QueryRestoredPurchase(callback);
53
- }
54
-
55
- public static void RestorePurchase(string purchaseToken, string orderId, string productId, string roleId,
56
- string serverId, string ext, Action<XDGOrderInfoWrapper> callback){
57
- platformWrapper.RestorePurchase(purchaseToken, orderId, productId, roleId, serverId, ext, callback);
58
- }
59
-
60
- public static void CheckRefundStatus(Action<XDGRefundResultWrapper> callback){
61
- platformWrapper.CheckRefundStatus(callback);
62
- }
63
-
64
- public static void CheckRefundStatusWithUI(Action<XDGRefundResultWrapper> callback){
65
- platformWrapper.CheckRefundStatusWithUI(callback);
66
- }
67
-
68
- // NOTE:@陆然,这里(https://xindong.slack.com/archives/C039BFRED4L/p1683530904377229?thread_ts=1681713013.576459&cid=C039BFRED4L)提到暂时去掉
69
- /// <summary>
70
- /// 微信支付和支付宝支付的原生实现,带 UI 方式
71
- /// </summary>
72
- /// <param name="orderId">游戏订单 ID,可为空,为空时采用随机字符串 ID 作为游戏 ID</param>
73
- /// <param name="productId">游戏商品 ID,不可为空</param>
74
- /// <param name="productName">游戏商品名称,使用 SDK 自带 UI 方式进行支付时作为弹窗预显示的游戏名称,可为空</param>
75
- /// <param name="payAmount">商品价格,单位(元),使用 SDK 自带 UI 方式进行支付时作为弹窗预显示的商品价格,可为 0</param>
76
- /// <param name="roleId">游戏角色 ID,支付角色 ID,服务端支付回调会包含该字段</param>
77
- /// <param name="serverId">游戏服务器 ID,所在服务器 ID,不能有特殊字符,服务端支付回调会包含该字段</param>
78
- /// <param name="ext">附加信息。服务端支付回调会包含该字段</param>
79
- public static void Pay(string orderId, string productId, string productName, double payAmount,
80
- string roleId, string serverId, string ext, Action<XDGOrderInfoWrapper> callback)
81
- {
82
- platformWrapper.PayWithUI(orderId, productId, productName, payAmount, roleId, serverId, ext, callback);
83
- }
84
-
85
- /// <summary>
86
- /// 微信支付和支付宝支付的原生实现,不带 UI 方式
87
- /// </summary>
88
- /// <param name="orderId">游戏订单 ID,可为空,为空时采用随机字符串 ID 作为游戏 ID</param>
89
- /// <param name="productId">游戏商品 ID,不可为空</param>
90
- /// <param name="productName">游戏商品名称,使用 SDK 自带 UI 方式进行支付时作为弹窗预显示的游戏名称,可为空</param>
91
- /// <param name="payAmount">商品价格,单位(元),使用 SDK 自带 UI 方式进行支付时作为弹窗预显示的商品价格,可为 0</param>
92
- /// <param name="roleId">游戏角色 ID,支付角色 ID,服务端支付回调会包含该字段</param>
93
- /// <param name="serverId">游戏服务器 ID,所在服务器 ID,不能有特殊字符,服务端支付回调会包含该字段</param>
94
- /// <param name="ext">附加信息。服务端支付回调会包含该字段</param>
95
- public static void Pay(PayType payType, string orderId, string productId, string productName, double payAmount,
96
- string roleId, string serverId, string ext, Action<XDGOrderInfoWrapper> callback)
97
- {
98
- platformWrapper.Pay(payType, orderId, productId, productName, payAmount, roleId, serverId, ext, callback);
99
- }
100
- }
101
- }
@@ -1,3 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 84207c1b3ffe4ea8a1aad6b81ecd9529
3
- timeCreated: 1672758855
@@ -1,3 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 6068f0cc12434b1582892457a2ea3da0
3
- timeCreated: 1672758219
@@ -1,3 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 9c9cc6bee44d40b0b7a15465753b6c3b
3
- timeCreated: 1672758243
@@ -1,252 +0,0 @@
1
- using System;
2
- using System.Collections.Generic;
3
- using TapTap.Common;
4
- using UnityEngine;
5
- using LC.Newtonsoft.Json;
6
- using XD.SDK.Common;
7
-
8
- namespace XD.SDK.Payment
9
- {
10
- public interface XDGSkuDetailInfo
11
- {
12
- XDGError xdgError { get; }
13
-
14
- List<SkuDetailBean> skuDetailList { get; }
15
- }
16
-
17
- #if UNITY_IOS
18
- [Serializable]
19
- public class SkuDetailBean
20
- {
21
- public string localizedDescription;
22
-
23
- public string localizedTitle;
24
-
25
- public double price;
26
-
27
- public string productIdentifier;
28
-
29
- public string localeIdentifier;
30
-
31
- public PriceLocale priceLocale;
32
-
33
- public SkuDetailBean(string json)
34
- {
35
- Dictionary<string,object> dic = Json.Deserialize(json) as Dictionary<string,object>;
36
- this.localeIdentifier = SafeDictionary.GetValue<string>(dic,"localeIdentifier");
37
- this.localizedTitle = SafeDictionary.GetValue<string>(dic,"localizedTitle") ;
38
- this.price = SafeDictionary.GetValue<double>(dic, "price");
39
- this.productIdentifier = SafeDictionary.GetValue<string>(dic,"productIdentifier");
40
- Dictionary<string,object> priceLocaleDic =
41
- SafeDictionary.GetValue<Dictionary<string,object>>(dic,"priceLocale") as Dictionary<string,object>;
42
- this.priceLocale = new PriceLocale(priceLocaleDic);
43
- }
44
-
45
- public SkuDetailBean(Dictionary<string,object> dic)
46
- {
47
- this.localeIdentifier = SafeDictionary.GetValue<string>(dic,"localeIdentifier");
48
- this.localizedTitle = SafeDictionary.GetValue<string>(dic,"localizedTitle") ;
49
- this.price = SafeDictionary.GetValue<double>(dic,"price");
50
- this.productIdentifier = SafeDictionary.GetValue<string>(dic,"productIdentifier");
51
- Dictionary<string,object> priceLocaleDic =
52
- SafeDictionary.GetValue<Dictionary<string,object>>(dic,"priceLocale") as Dictionary<string,object>;
53
- this.priceLocale = new PriceLocale(priceLocaleDic);
54
- }
55
-
56
- public SkuDetailBean()
57
- {
58
-
59
- }
60
-
61
- public string ToJSON(){
62
- return JsonUtility.ToJson(this);
63
- }
64
-
65
-
66
- }
67
- [Serializable]
68
- public class PriceLocale
69
- {
70
- public string localeIdentifier;
71
-
72
- public string languageCode;
73
-
74
- public string countryCode;
75
-
76
- public string scriptCode;
77
-
78
- public string calendarIdentifier;
79
-
80
- public string decimalSeparator;
81
-
82
- public string currencySymbol;
83
-
84
- public PriceLocale(Dictionary<string,object> dic)
85
- {
86
- this.localeIdentifier = SafeDictionary.GetValue<string>(dic,"localeIdentifier");
87
- this.languageCode = SafeDictionary.GetValue<string>(dic,"languageCode");
88
- this.countryCode = SafeDictionary.GetValue<string>(dic,"countryCode");
89
- this.scriptCode = SafeDictionary.GetValue<string>(dic,"scriptCode");
90
- this.calendarIdentifier = SafeDictionary.GetValue<string>(dic,"calendarIdentifier");
91
- this.decimalSeparator = SafeDictionary.GetValue<string>(dic,"decimalSeparator");
92
- this.currencySymbol = SafeDictionary.GetValue<string>(dic,"currencySymbol");
93
- }
94
- }
95
-
96
- #elif UNITY_ANDROID
97
- [Serializable]
98
- public class SkuDetailBean
99
- {
100
- private string _originString;
101
- public string description;
102
- public string name;
103
- public string productId;
104
- public string productType;
105
- public string title;
106
- public GoogleOneTimePurchaseOfferDetails googleOneTimePurchaseOfferDetails;
107
-
108
- public override string ToString()
109
- {
110
- return _originString;
111
- }
112
-
113
- public SkuDetailBean(Dictionary<string, object> dic)
114
- {
115
- if (dic == null) return;
116
- _originString = SafeDictionary.GetValue<string>(dic, "originString");
117
- description = SafeDictionary.GetValue<string>(dic, "description");
118
- name = SafeDictionary.GetValue<string>(dic, "name");
119
- productId = SafeDictionary.GetValue<string>(dic, "productId");
120
- productType = SafeDictionary.GetValue<string>(dic, "productType");
121
- title = SafeDictionary.GetValue<string>(dic, "title");
122
- googleOneTimePurchaseOfferDetails = new GoogleOneTimePurchaseOfferDetails(SafeDictionary.GetValue<Dictionary<string, object>>(dic, "googleOneTimePurchaseOfferDetails"));
123
- }
124
- }
125
-
126
- [Serializable]
127
- public class GoogleOneTimePurchaseOfferDetails
128
- {
129
- public string formattedPrice;
130
- public long priceAmountMicros;
131
- public string priceCurrencyCode;
132
-
133
- public GoogleOneTimePurchaseOfferDetails(Dictionary<string, object> dic)
134
- {
135
- formattedPrice = SafeDictionary.GetValue<string>(dic, "formattedPrice");
136
- priceAmountMicros = SafeDictionary.GetValue<long>(dic, "priceAmountMicros");
137
- priceCurrencyCode = SafeDictionary.GetValue<string>(dic, "priceCurrencyCode");
138
- }
139
- }
140
- #else
141
- public class SkuDetailBean
142
- {
143
- [JsonProperty("productSkuName")]
144
- public string ProductSkuName { get; set; }
145
-
146
- [JsonProperty("productSkuCode")]
147
- public string ProductSkuCode { get; set; }
148
-
149
- [JsonProperty("desc")]
150
- public string Desc { get; set; }
151
-
152
- [JsonProperty("channelSkuCode")]
153
- public string ChannelSkuCode { get; set; }
154
-
155
- [JsonProperty("currency")]
156
- public string Currency { get; set; }
157
-
158
- [JsonProperty("region")]
159
- public string Region { get; set; }
160
-
161
- [JsonProperty("costPrice")]
162
- public double CostPrice { get; set; }
163
-
164
- [JsonProperty("salePrice")]
165
- public double SalePrice { get; set; }
166
-
167
- public string ToJSON(){
168
- return JsonConvert.SerializeObject(this);
169
- }
170
- }
171
- #endif
172
-
173
- [Serializable]
174
- public class XDGRestoredPurchase
175
- {
176
- public string purchaseToken;
177
-
178
- public string productId;
179
-
180
- #if UNITY_ANDROID
181
- public string orderId;
182
-
183
- public string packageName;
184
-
185
- public long purchaseTime;
186
-
187
- public int purchaseState;
188
-
189
- public string developerPayload;
190
-
191
- public bool acknowledged;
192
-
193
- public bool autoRenewing;
194
- #endif
195
- public XDGRestoredPurchase(string json)
196
- {
197
- JsonUtility.FromJsonOverwrite(json, this);
198
- }
199
-
200
- public XDGRestoredPurchase(Dictionary<string, object> dic)
201
- {
202
- if (dic == null) return;
203
- #if UNITY_IOS
204
- this.purchaseToken = SafeDictionary.GetValue<string>(dic,"transactionIdentifier") ;
205
- this.productId = SafeDictionary.GetValue<string>(dic,"productIdentifier") ;
206
- #elif UNITY_ANDROID
207
- purchaseToken = SafeDictionary.GetValue<string>(dic, "purchaseToken");
208
- productId = SafeDictionary.GetValue<string>(dic, "productId");
209
- orderId = SafeDictionary.GetValue<string>(dic, "orderId");
210
- packageName = SafeDictionary.GetValue<string>(dic, "packageName");
211
- purchaseTime = SafeDictionary.GetValue<long>(dic, "purchaseTime");
212
- purchaseState = SafeDictionary.GetValue<int>(dic, "purchaseState");
213
- developerPayload = SafeDictionary.GetValue<string>(dic, "developerPayload");
214
- acknowledged = SafeDictionary.GetValue<bool>(dic, "acknowledged");
215
- autoRenewing = SafeDictionary.GetValue<bool>(dic, "autoRenewing");
216
- #endif
217
- }
218
- }
219
-
220
- public interface XDGOrderInfoWrapper
221
- {
222
- XDGError xdgError { get; }
223
- XDGOrderInfo orderInfo { get; }
224
- string debugMsg { get; }
225
- }
226
-
227
- [Serializable]
228
- public class XDGOrderInfo
229
- {
230
- public string orderId;
231
-
232
- public string productId;
233
-
234
- public string roleId;
235
-
236
- public string serverId;
237
-
238
- public string ext;
239
-
240
- public XDGOrderInfo() { }
241
-
242
- public XDGOrderInfo(Dictionary<string, object> dic)
243
- {
244
- if (dic == null) return;
245
- orderId = SafeDictionary.GetValue<string>(dic, "orderId");
246
- productId = SafeDictionary.GetValue<string>(dic, "productId");
247
- roleId = SafeDictionary.GetValue<string>(dic, "roleId");
248
- serverId = SafeDictionary.GetValue<string>(dic, "serverId");
249
- ext = SafeDictionary.GetValue<string>(dic, "ext");
250
- }
251
- }
252
- }
@@ -1,3 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 06d3c2a01a2049c7919bbcbe31be097d
3
- timeCreated: 1686564969