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,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 5d3c983616c3442159ad3210b5717ac5
2
+ guid: b459a850ca4464ed6a7d10b8bb394bdb
3
3
  PluginImporter:
4
4
  externalObjects: {}
5
5
  serializedVersion: 2
@@ -7,7 +7,7 @@ PluginImporter:
7
7
  executionOrder: {}
8
8
  defineConstraints: []
9
9
  isPreloaded: 0
10
- isOverridable: 0
10
+ isOverridable: 1
11
11
  isExplicitlyReferenced: 0
12
12
  validateReferences: 1
13
13
  platformData:
@@ -0,0 +1,32 @@
1
+ fileFormatVersion: 2
2
+ guid: f22ae1656e2c4342b43b1334e70b1a85
3
+ PluginImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ iconMap: {}
7
+ executionOrder: {}
8
+ defineConstraints: []
9
+ isPreloaded: 0
10
+ isOverridable: 1
11
+ isExplicitlyReferenced: 0
12
+ validateReferences: 1
13
+ platformData:
14
+ - first:
15
+ Android: Android
16
+ second:
17
+ enabled: 1
18
+ settings: {}
19
+ - first:
20
+ Any:
21
+ second:
22
+ enabled: 0
23
+ settings: {}
24
+ - first:
25
+ Editor: Editor
26
+ second:
27
+ enabled: 0
28
+ settings:
29
+ DefaultValueInitialized: true
30
+ userData:
31
+ assetBundleName:
32
+ assetBundleVariant:
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 7040c7094b873433a961bae40b47a923
2
+ guid: 8f130c4e1ca34def8668df9b3bd045f4
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: ffe4b5946970e4f978596b86f0596523
2
+ guid: 9030895ebfad41a6b8e8205b1fa5cc20
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}
@@ -2,22 +2,22 @@
2
2
 
3
3
  NS_ASSUME_NONNULL_BEGIN
4
4
 
5
- /** TDSGlobal 平台订单信息 */
5
+ /// 订单信息
6
6
  @interface XDGOrderInfo : NSObject
7
- /// 游戏侧订单号
8
- @property (nonatomic,copy,readonly) NSString *outTradeNo;
7
+ /// 游戏订单号
8
+ @property (nonatomic,copy,readonly) NSString *gameOrderId;
9
9
  /// 商品 ID
10
- @property (nonatomic,copy,readonly) NSString *productIdentifier;
11
- /// 角色所在服务器 ID
10
+ @property (nonatomic,copy,readonly) NSString *productId;
11
+ /// 服务器 ID
12
12
  @property (nonatomic,copy,readonly) NSString *serverId;
13
13
  /// 角色ID
14
14
  @property (nonatomic,copy,readonly) NSString *roleId;
15
- /// 当前订单所用货币
16
- @property (nonatomic,copy,readonly) NSString *currency;
17
- /// 当前订单价格
18
- @property (nonatomic,strong,readonly) NSDecimalNumber *price;
15
+ /// 透传参数
16
+ @property (nonatomic, copy, readonly) NSString *extra;
19
17
 
20
18
  + (XDGOrderInfo *)createOrderInfo:(NSDictionary *)orderInfo;
19
+
20
+ - (NSDictionary *)toDictionary;
21
21
  @end
22
22
 
23
23
  NS_ASSUME_NONNULL_END
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 0a6e302400ec64fb5b0e5e6c58dc14a0
2
+ guid: 02aa63ee6fe74b69ace72b4f14e5dc63
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -1,42 +1,14 @@
1
1
 
2
2
  #import <Foundation/Foundation.h>
3
3
 
4
- @class XDGProductInfo;
4
+ #import <XDPaymentSDK/XDGPaymentDefines.h>
5
+ #import <XDPaymentSDK/XDGPaymentParams.h>
6
+ #import <XDPaymentSDK/XDGPendingPurchase.h>
5
7
 
6
- @class XDGOrderInfo;
7
-
8
- #import <XDPaymentSDK/XDGTransactionInfo.h>
8
+ #import <XDCommonSDK/NSError+XDG.h>
9
9
 
10
10
  NS_ASSUME_NONNULL_BEGIN
11
11
 
12
- typedef NS_ENUM(NSInteger,XDGRepayMentCode) {
13
- XDGRepayMentCodeOk = 0x00, // ok
14
- XDGRepayMentCodeError = 0xff, // error
15
- };
16
- /**
17
- Describes the call back to the query of products
18
- @param result the result contains info of the products
19
- @param error error, if any.
20
- */
21
- typedef void(^XDGQueryProductsCallback)(NSArray<XDGProductInfo *> *_Nullable result,NSError *_Nullable error);
22
-
23
- /**
24
- Describes the call back to the query of unfinished transactions
25
- @param result the result contains unfinished transactions
26
- */
27
- typedef void(^XDGQueryRestoreProductsCallback)(NSArray<XDGTransactionInfo *> *result);
28
-
29
- /**
30
- Describes the call back to the transaction
31
- @param orderInfo info of the transaction
32
- @param error error, if any.
33
- */
34
- typedef void(^XDGPaymentCallback)(XDGOrderInfo *_Nullable orderInfo,NSError *_Nullable error);
35
-
36
-
37
- typedef void(^XDGRePaymentCallback)(XDGRepayMentCode code,NSString * _Nullable msg,NSDictionary *_Nullable data);
38
-
39
-
40
12
  @interface XDGPayment : NSObject
41
13
 
42
14
  /// 查询商品价格,请等待回调之后再做下一次查询,否则可能造成数据错乱
@@ -44,36 +16,19 @@ typedef void(^XDGRePaymentCallback)(XDGRepayMentCode code,NSString * _Nullable m
44
16
  /// @param completionHandler 查询结果处理
45
17
  + (void)queryWithProductIds:(NSArray *)productIds completionHandler:(XDGQueryProductsCallback)completionHandler;
46
18
 
47
- /// 支付商品
48
- /// @param orderId 商品ID
49
- /// @param productId 商品ID
50
- /// @param roleId 角色ID
51
- /// @param serverId 服务器ID
52
- /// @param ext 支付额外信息EXT
53
- /// @param completionHandler 支付结果处理
54
- + (void)payWithOrderId:(NSString *)orderId
55
- productId:(NSString *)productId
56
- roleId:(NSString *)roleId
57
- serverId:(NSString *)serverId
58
- ext:(NSString *)ext
59
- completionHandler:(XDGPaymentCallback)completionHandler;
19
+ /// 支付商品 (支持批量购买)
20
+ /// @param paymentParam 支付参数
21
+ /// @param completionHandler 支付结果回调
22
+ + (void)payWithParams:(XDGPaymentParams *)paymentParam completionHandler:(XDGPaymentCallback)completionHandler;
60
23
 
61
24
  /// 查询当前是否有未处理订单或者礼包码
62
25
  /// @param completionHandler 查询结果处理
63
- + (void)queryRestoredPurchases:(XDGQueryRestoreProductsCallback)completionHandler;
26
+ + (void)queryPendingPurchases:(XDGQueryPendingPurchasesCallback)completionHandler;
64
27
 
65
- /// 恢复一笔订单/礼包码
66
- /// @param restoreTransaction 需要回复的订单信息,queryRestoredProducts回调中返回
67
- /// @param orderId 商品ID
68
- /// @param roleId 角色ID
69
- /// @param serverId 服务器ID
70
- /// @param ext 支付EXT信息
28
+ /// 消费订单/礼包码
29
+ /// @param paymentParam 支付参数
71
30
  /// @param completionHandler 回调处理
72
- + (void)restorePurchase:(XDGTransactionInfo *)restoreTransaction
73
- orderId:(NSString *)orderId
74
- roleId:(NSString *)roleId
75
- serverId:(NSString *)serverId
76
- ext:(NSString *)ext
31
+ + (void)handlePendingPurchase:(XDGPaymentParams *)paymentParam
77
32
  completionHandler:(XDGPaymentCallback)completionHandler;
78
33
 
79
34
 
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: de11b94aca349419d97b1eac261fa471
2
+ guid: aecbd8e422bc4e24aa04d95a77c623eb
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -0,0 +1,49 @@
1
+ //
2
+ // XDGPaymentDefines.h
3
+ // XDPaymentSDK
4
+ //
5
+ // Created by Fattycat on 2025/3/28.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+ #import <XDPaymentSDK/XDGProductInfo.h>
10
+ #import <XDPaymentSDK/XDGOrderInfo.h>
11
+ #import <XDPaymentSDK/XDGPendingPurchase.h>
12
+
13
+ #import <XDCommonSDK/NSError+XDG.h>
14
+
15
+ NS_ASSUME_NONNULL_BEGIN
16
+
17
+ typedef NS_ENUM(NSInteger, XDGRepayMentCode) {
18
+ XDGRepayMentCodeOk = XDGErrorCodeSuccess, // ok
19
+ XDGRepayMentCodeError = XDGErrorCodeFailed, // error
20
+ };
21
+
22
+ /**
23
+ 商品查询回调
24
+ @param result 商品信息
25
+ @param error 错误信息
26
+ */
27
+ typedef void (^XDGQueryProductsCallback)(NSArray<XDGProductInfo *> *_Nullable result, NSError *_Nullable error);
28
+
29
+ /**
30
+ 支付回调
31
+ @param orderInfo 订单信息
32
+ @param error 错误信息
33
+ */
34
+ typedef void (^XDGPaymentCallback)(XDGOrderInfo *_Nullable orderInfo, NSError *_Nullable error);
35
+
36
+ /**
37
+ 未处理订单查询回调
38
+ @param result 未处理订单信息
39
+ */
40
+ typedef void (^XDGQueryPendingPurchasesCallback)(NSArray<XDGPendingPurchase *> *result);
41
+
42
+ /// 补款回调
43
+ typedef void (^XDGRePaymentCallback)(XDGRepayMentCode code, NSString *_Nullable msg, NSDictionary *_Nullable data);
44
+
45
+ @interface XDGPaymentDefines : NSObject
46
+
47
+ @end
48
+
49
+ NS_ASSUME_NONNULL_END
@@ -1,6 +1,6 @@
1
1
  fileFormatVersion: 2
2
- guid: 209e968e45fcd47c69bde9feec5e0a07
3
- TextScriptImporter:
2
+ guid: 16fd62a0a7e74bd9ae4af1504eaf43bb
3
+ DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
6
6
  assetBundleName:
@@ -0,0 +1,43 @@
1
+ //
2
+ // XDGPaymentParams.h
3
+ // XDPaymentSDK
4
+ //
5
+ // Created by Fattycat on 2024/9/13.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ NS_ASSUME_NONNULL_BEGIN
11
+
12
+ @interface XDGPaymentParams : NSObject
13
+
14
+ /// 游戏订单 ID,可选
15
+ @property(nonatomic, strong, nullable) NSString *gameOrderId;
16
+
17
+ /// 商品 ID,必填
18
+ @property(nonatomic, strong) NSString *productId;
19
+
20
+ /// 角色 ID
21
+ @property(nonatomic, strong, nullable) NSString *roleId;
22
+
23
+ /// 服务器 ID
24
+ @property(nonatomic, strong, nullable) NSString *serverId;
25
+
26
+ /// 透传参数
27
+ @property(nonatomic, strong, nullable) NSString *extra;
28
+
29
+ /// 商品数量,默认为1,可选 1-10,恢复订单时不可用
30
+ @property(nonatomic, assign) NSInteger quantity;
31
+
32
+ /// 需要恢复的订单 ID,只在恢复订单时使用,可选
33
+ @property(nonatomic, strong, nullable) NSString *pendingPurchaseToken;
34
+
35
+ + (XDGPaymentParams *_Nullable)createWithDictionary:(NSDictionary *)dict;
36
+
37
+ - (NSError * _Nullable)checkValid:(BOOL)isPendingPurchase;
38
+
39
+ - (NSDictionary *)toDictionary;
40
+
41
+ @end
42
+
43
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: 6b4c247d4d8a435dae17c345219fc0a1
3
+ DefaultImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
@@ -10,9 +10,13 @@
10
10
  NS_ASSUME_NONNULL_BEGIN
11
11
 
12
12
  @interface XDGPaymentService : NSObject
13
+
13
14
  // 查询 queryWithProductIds :
14
15
  + (void)productIds:(NSArray *)productIds bridgeCallback:(void (^)(NSString *result))callback;
15
16
 
17
+ + (void)params:(NSDictionary *)params
18
+ bridgeCallback:(void (^)(NSString *result))callback;
19
+
16
20
  // 支付 payWithProduct
17
21
  + (void)orderId:(NSString *)orderId
18
22
  productId:(NSString *)productId
@@ -23,14 +27,13 @@ NS_ASSUME_NONNULL_BEGIN
23
27
 
24
28
  + (void)queryRestoredPurchases:(void (^)(NSString *result))callback;
25
29
 
26
- + (void)purchaseToken:(NSString *)purchaseToken
27
- productId:(NSString *)productId
28
- orderId:(NSString *)orderId
29
- roleId:(NSString *)roleId
30
- serverId:(NSString *)serverId
31
- ext:(NSString *)ext
32
- ext2:(NSString *)ext2
33
- bridgeCallback:(void (^)(NSString *result))callback;
30
+ + (void)transactionIdentifier:(NSString *)transactionIdentifier
31
+ productIdentifier:(NSString *)productIdentifier
32
+ orderId:(NSString *)orderId
33
+ roleId:(NSString *)roleId
34
+ serverId:(NSString *)serverId
35
+ ext:(NSString *)ext
36
+ bridgeCallback:(void (^)(NSString *result))callback;
34
37
 
35
38
  /// 不带界面的补款
36
39
  + (void)checkRefundStatus:(void (^)(NSString *result))callback;
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: f5eed740debc946778d5d509c185c571
2
+ guid: 868372ba49d64c42b6c7a40866ebbfa4
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -5,5 +5,6 @@
5
5
  // Created by Fattycat on 2023/4/14.
6
6
  //
7
7
 
8
- #define XDGPayment_VERSION @"6.21.1"
9
- // HASH ecb66cb0
8
+ #define XDGPayment_VERSION @"7.0.0"
9
+ #define XDSPayment_VERSION_CODE @"7000000"
10
+ // HASH 7f0303a
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 5a66214e2c0144f17a3c2055b12331de
2
+ guid: 95699cd0991e405ebfabb9329310ee4c
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -0,0 +1,18 @@
1
+
2
+ #import <Foundation/Foundation.h>
3
+
4
+ NS_ASSUME_NONNULL_BEGIN
5
+
6
+ @interface XDGPendingPurchase : NSObject
7
+
8
+ /// 交易 ID
9
+ @property (nonatomic, strong) NSString *pendingPurchaseToken;
10
+
11
+ /// 商品 ID
12
+ @property (nonatomic, strong) NSString *productId;
13
+
14
+ - (NSDictionary *)toDictionary;
15
+
16
+ @end
17
+
18
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: d15d8872bd114b46a01e312264952a16
3
+ DefaultImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
@@ -4,15 +4,42 @@
4
4
  NS_ASSUME_NONNULL_BEGIN
5
5
 
6
6
  @interface XDGProductInfo : NSObject
7
- @property(nonatomic,strong,readonly) NSString *localizedDescription;
8
7
 
8
+ /// 商品 ID
9
+ @property (nonatomic, strong, readonly) NSString *productIdentifier;
10
+
11
+ /// 商品展示价格(包含本地化符号 & 价格)
12
+ @property (nonatomic, strong, readonly) NSString *displayPrice;
13
+
14
+ /// 本地化标题
9
15
  @property(nonatomic,strong,readonly) NSString *localizedTitle;
10
16
 
17
+ /// 本地化描述
18
+ @property (nonatomic, strong, readonly) NSString *localizedDescription;
19
+
20
+ /// 商品价格
21
+ /// 建议直接使用 displayPrice
11
22
  @property(nonatomic,strong,readonly) NSDecimalNumber *price;
12
23
 
24
+ /// 价格符号
25
+ /// 建议直接使用 displayPrice
26
+ @property (nonatomic, strong, readonly) NSString *currencySymbol;
27
+
28
+ /// 价格代码
29
+ /// 建议直接使用 displayPrice
30
+ @property (nonatomic, strong, readonly) NSString *currencyCode;
31
+
32
+ /// 价格本地化信息
33
+ /// 建议直接使用 displayPrice
13
34
  @property(nonatomic,strong,readonly) NSLocale *priceLocale;
14
35
 
15
- @property(nonatomic,strong,readonly) NSString *productIdentifier;
36
+ - (nonnull XDGProductInfo *)initWithProductId:(nonnull NSString *)productId
37
+ price:(nonnull NSDecimalNumber *)price
38
+ priceLocale:(nonnull NSLocale *)priceLocale
39
+ localizedTitle:(nonnull NSString *)localizedTitle
40
+ localizedDescription:(nonnull NSString *)localizedDescription;
41
+
42
+ - (NSDictionary *)toDictionary;
16
43
 
17
44
  @end
18
45
 
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 1bb57965c05be447c9e8ddb08a09c146
2
+ guid: 5f6c44f9c3e44b579243205c47bbc64b
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -4,10 +4,14 @@
4
4
  NS_ASSUME_NONNULL_BEGIN
5
5
 
6
6
  @interface XDGTransactionInfo : NSObject
7
- // The unique server-provided identifier
8
- @property (nonatomic,strong,readonly) NSString *transactionIdentifier;
9
7
 
10
- @property (nonatomic,strong,readonly) NSString *productIdentifier;
8
+ /// 交易 ID
9
+ @property (nonatomic, strong) NSString *transactionId;
10
+
11
+ /// 商品 ID
12
+ @property (nonatomic, strong) NSString *productIdentifier;
13
+
14
+ - (NSDictionary *)toDictionary;
11
15
 
12
16
  @end
13
17
 
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: ddc4fa5e2132c41af84c2de3bf4285f8
2
+ guid: 84a4f4801ef8445d86373578c30d9a1f
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -17,7 +17,8 @@ FOUNDATION_EXPORT const unsigned char XDPaymentSDKVersionString[];
17
17
 
18
18
  #import <XDPaymentSDK/XDGPayment.h>
19
19
  #import <XDPaymentSDK/XDGProductInfo.h>
20
- #import <XDPaymentSDK/XDGTransactionInfo.h>
20
+ #import <XDPaymentSDK/XDGPendingPurchase.h>
21
21
  #import <XDPaymentSDK/XDGOrderInfo.h>
22
22
  #import <XDPaymentSDK/XDGPaymentService.h>
23
23
  #import <XDPaymentSDK/XDGPaymentVersion.h>
24
+ #import <XDPaymentSDK/XDGPaymentParams.h>
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 5a7dd4428ac9d4aaba441ab7800eaf2d
2
+ guid: 1c22284443524667a04e2dcb9edf2f3a
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 1491b204ddf68442190d15d77f8ea1bb
2
+ guid: a010deb5886949a88351753c45978f1c
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 343cc7ec566ef4279afec3c7ad7400c8
2
+ guid: 1f53717552eb4b7fbd2610e0ce0fa349
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: b1c4b11139d0e478a9020c8f617019ea
2
+ guid: 5b84f42d927f4cfb9d47738519492304
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 8989c5f0c4138463e8fd956ad3675b2b
2
+ guid: a6b78f8f7fc04f48903a1295fc5f31bf
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 9cbbc27ecd0014d379296b97392a2f4d
2
+ guid: dde358aee99f44bb9c1ad933d2d06148
3
3
  DefaultImporter:
4
4
  externalObjects: {}
5
5
  userData:
@@ -1,6 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 9f60a694492a145c183edb575f87ad88
3
- folderAsset: yes
2
+ guid: 1c090750ca3b4befae689c38c0aa0c47
4
3
  PluginImporter:
5
4
  externalObjects: {}
6
5
  serializedVersion: 2
@@ -12,17 +11,71 @@ PluginImporter:
12
11
  isExplicitlyReferenced: 0
13
12
  validateReferences: 1
14
13
  platformData:
14
+ - first:
15
+ : Any
16
+ second:
17
+ enabled: 0
18
+ settings:
19
+ Exclude Android: 1
20
+ Exclude Editor: 1
21
+ Exclude Linux64: 1
22
+ Exclude OSXUniversal: 1
23
+ Exclude WebGL: 1
24
+ Exclude Win: 1
25
+ Exclude Win64: 1
26
+ Exclude iOS: 0
27
+ - first:
28
+ Android: Android
29
+ second:
30
+ enabled: 0
31
+ settings:
32
+ CPU: ARMv7
15
33
  - first:
16
34
  Any:
17
35
  second:
18
- enabled: 1
36
+ enabled: 0
19
37
  settings: {}
20
38
  - first:
21
39
  Editor: Editor
22
40
  second:
23
41
  enabled: 0
24
42
  settings:
43
+ CPU: AnyCPU
25
44
  DefaultValueInitialized: true
45
+ OS: AnyOS
46
+ - first:
47
+ Standalone: Linux64
48
+ second:
49
+ enabled: 0
50
+ settings:
51
+ CPU: None
52
+ - first:
53
+ Standalone: OSXUniversal
54
+ second:
55
+ enabled: 0
56
+ settings:
57
+ CPU: None
58
+ - first:
59
+ Standalone: Win
60
+ second:
61
+ enabled: 0
62
+ settings:
63
+ CPU: None
64
+ - first:
65
+ Standalone: Win64
66
+ second:
67
+ enabled: 0
68
+ settings:
69
+ CPU: None
70
+ - first:
71
+ iPhone: iOS
72
+ second:
73
+ enabled: 1
74
+ settings:
75
+ AddToEmbeddedBinaries: true
76
+ CPU: AnyCPU
77
+ CompileFlags:
78
+ FrameworkDependencies:
26
79
  userData:
27
80
  assetBundleName:
28
81
  assetBundleVariant:
package/Plugins/iOS.meta CHANGED
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 026724d2bfe7d43d597db1b01b5fb845
2
+ guid: 3723976a3c1f4c15a741031e5b8ed3d1
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}
package/Plugins.meta CHANGED
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 44f60da4cd1904757931064b14592226
2
+ guid: 12061ffa64bc4618be0548b44b8d8bd3
3
3
  folderAsset: yes
4
4
  DefaultImporter:
5
5
  externalObjects: {}