com.xd.sdk.payment 6.29.1 → 7.0.0
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.
- package/Plugins/Android/libs/XDGBridgePayment_v7_7.0.0.aar +0 -0
- package/Plugins/Android/libs/{XDGPayment_6.29.1.aar.meta → XDGBridgePayment_v7_7.0.0.aar.meta} +2 -2
- package/Plugins/Android/libs/XDGPaymentUPPay_7.0.0.aar +0 -0
- package/Plugins/Android/libs/XDGPaymentUPPay_7.0.0.aar.meta +3 -0
- package/Plugins/Android/libs/XDGPayment_7.0.0.aar +0 -0
- package/Plugins/Android/libs/XDGPayment_7.0.0.aar.meta +3 -0
- package/Plugins/Android/libs.meta +1 -1
- package/Plugins/Android.meta +1 -1
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGOrderInfo.h +7 -9
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGOrderInfo.h.meta +1 -1
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPayment.h +8 -60
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPayment.h.meta +1 -1
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPaymentDefines.h +49 -0
- package/{README.md.meta → Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPaymentDefines.h.meta} +2 -2
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPaymentParams.h +20 -2
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPaymentParams.h.meta +1 -1
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPaymentService.h.meta +1 -1
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPaymentVersion.h +3 -3
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPaymentVersion.h.meta +1 -1
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPendingPurchase.h +18 -0
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGPendingPurchase.h.meta +7 -0
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGProductInfo.h +28 -3
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGProductInfo.h.meta +1 -1
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGTransactionInfo.h +7 -3
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDGTransactionInfo.h.meta +1 -1
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDPaymentSDK.h +1 -1
- package/Plugins/iOS/XDPaymentSDK.framework/Headers/XDPaymentSDK.h.meta +1 -1
- package/Plugins/iOS/XDPaymentSDK.framework/Headers.meta +1 -1
- package/Plugins/iOS/XDPaymentSDK.framework/Info.plist +0 -0
- package/Plugins/iOS/XDPaymentSDK.framework/Info.plist.meta +1 -1
- package/Plugins/iOS/XDPaymentSDK.framework/Modules/module.modulemap.meta +1 -1
- package/Plugins/iOS/XDPaymentSDK.framework/Modules.meta +1 -1
- package/Plugins/iOS/XDPaymentSDK.framework/XDPaymentSDK +0 -0
- package/Plugins/iOS/XDPaymentSDK.framework/XDPaymentSDK.meta +1 -1
- package/Plugins/iOS/XDPaymentSDK.framework.meta +3 -3
- package/Plugins/iOS.meta +1 -1
- package/Plugins.meta +1 -1
- package/{Mobile → Runtime/Internal/Mobile}/PaymentConstants.cs +5 -9
- package/{Mobile → Runtime/Internal/Mobile}/PaymentConstants.cs.meta +1 -1
- package/Runtime/Internal/Mobile/PaymentFeaturesImpl.cs +185 -0
- package/{Mobile/Editor/XDPaymentMobileProcessBuild.cs.meta → Runtime/Internal/Mobile/PaymentFeaturesImpl.cs.meta} +1 -1
- package/Runtime/Internal/Mobile/XDGRestoredPurchasesWrapper.cs +23 -0
- package/{Mobile → Runtime/Internal/Mobile}/XDGRestoredPurchasesWrapper.cs.meta +1 -1
- package/{Mobile.meta → Runtime/Internal/Mobile.meta} +1 -1
- package/Runtime/Internal/Standalone/AliyunTrack.Payment.cs +156 -0
- package/{Editor/XDGAndroidPaymentProcessor.cs.meta → Runtime/Internal/Standalone/AliyunTrack.Payment.cs.meta} +1 -1
- package/Runtime/Internal/Standalone/Bean/PayCheckResponse.cs +19 -0
- package/{Editor/XDPaymentProcessBuild.cs.meta → Runtime/Internal/Standalone/Bean/PayCheckResponse.cs.meta} +1 -1
- package/Runtime/Internal/Standalone/Bean/PayInfo.cs +31 -0
- package/Runtime/Internal/Standalone/Bean/PayInfo.cs.meta +11 -0
- package/Runtime/Internal/Standalone/Bean/QueryProductsResponse.cs +46 -0
- package/Runtime/Internal/Standalone/Bean/QueryProductsResponse.cs.meta +11 -0
- package/Runtime/Internal/Standalone/Bean/XDGRefundResultWrapper.cs +19 -0
- package/Runtime/{XDGRefundResultWrapper.cs.meta → Internal/Standalone/Bean/XDGRefundResultWrapper.cs.meta} +1 -1
- package/{Editor/XD.SDK.Payment.Editor.asmdef.meta → Runtime/Internal/Standalone/Bean.meta} +3 -2
- package/Runtime/Internal/Standalone/PayListener.cs +83 -0
- package/Runtime/Internal/Standalone/PayListener.cs.meta +11 -0
- package/Runtime/Internal/Standalone/PayModule.cs +261 -0
- package/Runtime/Internal/Standalone/PayModule.cs.meta +11 -0
- package/Runtime/Internal/Standalone/PaymentAlert.cs +112 -0
- package/Runtime/Internal/Standalone/PaymentAlert.cs.meta +11 -0
- package/Runtime/Internal/Standalone/PaymentFeaturesImpl.cs +239 -0
- package/Runtime/Internal/Standalone/PaymentFeaturesImpl.cs.meta +11 -0
- package/{Mobile/Editor.meta → Runtime/Internal/Standalone.meta} +1 -1
- package/Runtime/Internal/XDGPaymentInternal.cs +46 -0
- package/Runtime/Internal/XDGPaymentInternal.cs.meta +11 -0
- package/Runtime/{XDGRefundDetails.cs → Internal/XDGRefundDetails.cs} +3 -5
- package/Runtime/{XDGRefundDetails.cs.meta → Internal/XDGRefundDetails.cs.meta} +1 -1
- package/Runtime/{XDGRefundResultWrapper.cs → Internal/XDGRefundResultWrapper.cs} +1 -1
- package/Runtime/Internal/XDGRefundResultWrapper.cs.meta +11 -0
- package/{Editor.meta → Runtime/Internal.meta} +1 -1
- package/Runtime/Public/XDGPayment.Deprecated.cs +231 -0
- package/Runtime/Public/XDGPayment.Deprecated.cs.meta +11 -0
- package/Runtime/Public/XDGPayment.cs +97 -0
- package/Runtime/{XDGPayment.cs.meta → Public/XDGPayment.cs.meta} +1 -1
- package/Runtime/Public/XDGPaymentEventHandler.cs +34 -0
- package/Runtime/Public/XDGPaymentEventHandler.cs.meta +3 -0
- package/Runtime/Public.meta +8 -0
- package/Runtime/XD.SDK.Payment.asmdef +5 -2
- package/Runtime/XD.SDK.Payment.asmdef.meta +1 -1
- package/Runtime.meta +1 -1
- package/package.json +5 -5
- package/package.json.meta +2 -2
- package/Editor/XD.SDK.Payment.Editor.asmdef +0 -19
- package/Editor/XDGAndroidPaymentProcessor.cs +0 -44
- package/Editor/XDPaymentProcessBuild.cs +0 -18
- package/Mobile/Editor/XD.SDK.Payment.Mobile.Editor.asmdef +0 -20
- package/Mobile/Editor/XD.SDK.Payment.Mobile.Editor.asmdef.meta +0 -7
- package/Mobile/Editor/XDPaymentMobileProcessBuild.cs +0 -20
- package/Mobile/XD.SDK.Payment.Mobile.asmdef +0 -22
- package/Mobile/XD.SDK.Payment.Mobile.asmdef.meta +0 -7
- package/Mobile/XDGDataBean.cs +0 -242
- package/Mobile/XDGDataBean.cs.meta +0 -11
- package/Mobile/XDGPaymentDetailsParam.cs +0 -127
- package/Mobile/XDGPaymentDetailsParam.cs.meta +0 -11
- package/Mobile/XDGPaymentMobile.cs +0 -146
- package/Mobile/XDGPaymentMobile.cs.meta +0 -11
- package/Mobile/XDGPaymentMobileImpl.cs +0 -389
- package/Mobile/XDGPaymentMobileImpl.cs.meta +0 -11
- package/Mobile/XDGRestoredPurchasesWrapper.cs +0 -42
- package/Plugins/Android/libs/XDGPayment_6.29.1.aar +0 -0
- package/README.md +0 -0
- package/Runtime/IXDGPayment.cs +0 -41
- package/Runtime/IXDGPayment.cs.meta +0 -11
- package/Runtime/WebPayResultType.cs +0 -8
- package/Runtime/WebPayResultType.cs.meta +0 -11
- package/Runtime/XDGPayType.cs +0 -9
- package/Runtime/XDGPayType.cs.meta +0 -11
- package/Runtime/XDGPayment.cs +0 -110
- package/Runtime/XDGPaymentParams.cs +0 -82
- package/Runtime/XDGPaymentParams.cs.meta +0 -11
- package/Runtime/XDGSkuDetailInfo.cs +0 -270
- package/Runtime/XDGSkuDetailInfo.cs.meta +0 -11
|
Binary file
|
package/Plugins/Android/libs/{XDGPayment_6.29.1.aar.meta → XDGBridgePayment_v7_7.0.0.aar.meta}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
fileFormatVersion: 2
|
|
2
|
-
guid:
|
|
2
|
+
guid: d80cd6109a9b149a1ae0750375bbdbbe
|
|
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:
|
|
10
|
+
isOverridable: 1
|
|
11
11
|
isExplicitlyReferenced: 0
|
|
12
12
|
validateReferences: 1
|
|
13
13
|
platformData:
|
|
Binary file
|
|
Binary file
|
package/Plugins/Android.meta
CHANGED
|
@@ -2,20 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
NS_ASSUME_NONNULL_BEGIN
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/// 订单信息
|
|
6
6
|
@interface XDGOrderInfo : NSObject
|
|
7
|
-
///
|
|
8
|
-
@property (nonatomic,copy,readonly) NSString *
|
|
7
|
+
/// 游戏订单号
|
|
8
|
+
@property (nonatomic,copy,readonly) NSString *gameOrderId;
|
|
9
9
|
/// 商品 ID
|
|
10
|
-
@property (nonatomic,copy,readonly) NSString *
|
|
11
|
-
///
|
|
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 *
|
|
17
|
-
/// 当前订单价格
|
|
18
|
-
@property (nonatomic,strong,readonly) NSDecimalNumber *price;
|
|
15
|
+
/// 透传参数
|
|
16
|
+
@property (nonatomic, copy, readonly) NSString *extra;
|
|
19
17
|
|
|
20
18
|
+ (XDGOrderInfo *)createOrderInfo:(NSDictionary *)orderInfo;
|
|
21
19
|
|
|
@@ -1,44 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
#import <Foundation/Foundation.h>
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
#import <XDPaymentSDK/XDGPaymentDefines.h>
|
|
5
|
+
#import <XDPaymentSDK/XDGPaymentParams.h>
|
|
6
|
+
#import <XDPaymentSDK/XDGPendingPurchase.h>
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@class XDGPaymentParams;
|
|
9
|
-
|
|
10
|
-
#import <XDPaymentSDK/XDGTransactionInfo.h>
|
|
8
|
+
#import <XDCommonSDK/NSError+XDG.h>
|
|
11
9
|
|
|
12
10
|
NS_ASSUME_NONNULL_BEGIN
|
|
13
11
|
|
|
14
|
-
typedef NS_ENUM(NSInteger,XDGRepayMentCode) {
|
|
15
|
-
XDGRepayMentCodeOk = 0x00, // ok
|
|
16
|
-
XDGRepayMentCodeError = 0xff, // error
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
Describes the call back to the query of products
|
|
20
|
-
@param result the result contains info of the products
|
|
21
|
-
@param error error, if any.
|
|
22
|
-
*/
|
|
23
|
-
typedef void(^XDGQueryProductsCallback)(NSArray<XDGProductInfo *> *_Nullable result,NSError *_Nullable error);
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
Describes the call back to the query of unfinished transactions
|
|
27
|
-
@param result the result contains unfinished transactions
|
|
28
|
-
*/
|
|
29
|
-
typedef void(^XDGQueryRestoreProductsCallback)(NSArray<XDGTransactionInfo *> *result);
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
Describes the call back to the transaction
|
|
33
|
-
@param orderInfo info of the transaction
|
|
34
|
-
@param error error, if any.
|
|
35
|
-
*/
|
|
36
|
-
typedef void(^XDGPaymentCallback)(XDGOrderInfo *_Nullable orderInfo,NSError *_Nullable error);
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
typedef void(^XDGRePaymentCallback)(XDGRepayMentCode code,NSString * _Nullable msg,NSDictionary *_Nullable data);
|
|
40
|
-
|
|
41
|
-
|
|
42
12
|
@interface XDGPayment : NSObject
|
|
43
13
|
|
|
44
14
|
/// 查询商品价格,请等待回调之后再做下一次查询,否则可能造成数据错乱
|
|
@@ -51,36 +21,14 @@ typedef void(^XDGRePaymentCallback)(XDGRepayMentCode code,NSString * _Nullable m
|
|
|
51
21
|
/// @param completionHandler 支付结果回调
|
|
52
22
|
+ (void)payWithParams:(XDGPaymentParams *)paymentParam completionHandler:(XDGPaymentCallback)completionHandler;
|
|
53
23
|
|
|
54
|
-
/// 支付商品
|
|
55
|
-
/// @param orderId 商品ID
|
|
56
|
-
/// @param productId 商品ID
|
|
57
|
-
/// @param roleId 角色ID
|
|
58
|
-
/// @param serverId 服务器ID
|
|
59
|
-
/// @param ext 支付额外信息EXT
|
|
60
|
-
/// @param completionHandler 支付结果处理
|
|
61
|
-
+ (void)payWithOrderId:(NSString *)orderId
|
|
62
|
-
productId:(NSString *)productId
|
|
63
|
-
roleId:(NSString *)roleId
|
|
64
|
-
serverId:(NSString *)serverId
|
|
65
|
-
ext:(NSString *)ext
|
|
66
|
-
completionHandler:(XDGPaymentCallback)completionHandler;
|
|
67
|
-
|
|
68
24
|
/// 查询当前是否有未处理订单或者礼包码
|
|
69
25
|
/// @param completionHandler 查询结果处理
|
|
70
|
-
+ (void)
|
|
26
|
+
+ (void)queryPendingPurchases:(XDGQueryPendingPurchasesCallback)completionHandler;
|
|
71
27
|
|
|
72
|
-
///
|
|
73
|
-
/// @param
|
|
74
|
-
/// @param orderId 商品ID
|
|
75
|
-
/// @param roleId 角色ID
|
|
76
|
-
/// @param serverId 服务器ID
|
|
77
|
-
/// @param ext 支付EXT信息
|
|
28
|
+
/// 消费订单/礼包码
|
|
29
|
+
/// @param paymentParam 支付参数
|
|
78
30
|
/// @param completionHandler 回调处理
|
|
79
|
-
+ (void)
|
|
80
|
-
orderId:(NSString *)orderId
|
|
81
|
-
roleId:(NSString *)roleId
|
|
82
|
-
serverId:(NSString *)serverId
|
|
83
|
-
ext:(NSString *)ext
|
|
31
|
+
+ (void)handlePendingPurchase:(XDGPaymentParams *)paymentParam
|
|
84
32
|
completionHandler:(XDGPaymentCallback)completionHandler;
|
|
85
33
|
|
|
86
34
|
|
|
@@ -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
|
|
@@ -11,14 +11,32 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
11
11
|
|
|
12
12
|
@interface XDGPaymentParams : NSObject
|
|
13
13
|
|
|
14
|
+
/// 游戏订单 ID,可选
|
|
14
15
|
@property(nonatomic, strong, nullable) NSString *gameOrderId;
|
|
16
|
+
|
|
17
|
+
/// 商品 ID,必填
|
|
15
18
|
@property(nonatomic, strong) NSString *productId;
|
|
19
|
+
|
|
20
|
+
/// 角色 ID
|
|
16
21
|
@property(nonatomic, strong, nullable) NSString *roleId;
|
|
22
|
+
|
|
23
|
+
/// 服务器 ID
|
|
17
24
|
@property(nonatomic, strong, nullable) NSString *serverId;
|
|
18
|
-
|
|
25
|
+
|
|
26
|
+
/// 透传参数
|
|
27
|
+
@property(nonatomic, strong, nullable) NSString *extra;
|
|
28
|
+
|
|
29
|
+
/// 商品数量,默认为1,可选 1-10,恢复订单时不可用
|
|
19
30
|
@property(nonatomic, assign) NSInteger quantity;
|
|
20
31
|
|
|
21
|
-
|
|
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;
|
|
22
40
|
|
|
23
41
|
@end
|
|
24
42
|
|
|
@@ -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
|
|
@@ -4,17 +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
|
-
|
|
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;
|
|
16
41
|
|
|
17
|
-
|
|
42
|
+
- (NSDictionary *)toDictionary;
|
|
18
43
|
|
|
19
44
|
@end
|
|
20
45
|
|
|
@@ -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
|
-
|
|
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
|
|
|
@@ -17,7 +17,7 @@ FOUNDATION_EXPORT const unsigned char XDPaymentSDKVersionString[];
|
|
|
17
17
|
|
|
18
18
|
#import <XDPaymentSDK/XDGPayment.h>
|
|
19
19
|
#import <XDPaymentSDK/XDGProductInfo.h>
|
|
20
|
-
#import <XDPaymentSDK/
|
|
20
|
+
#import <XDPaymentSDK/XDGPendingPurchase.h>
|
|
21
21
|
#import <XDPaymentSDK/XDGOrderInfo.h>
|
|
22
22
|
#import <XDPaymentSDK/XDGPaymentService.h>
|
|
23
23
|
#import <XDPaymentSDK/XDGPaymentVersion.h>
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
fileFormatVersion: 2
|
|
2
|
-
guid:
|
|
3
|
-
folderAsset: yes
|
|
2
|
+
guid: 1c090750ca3b4befae689c38c0aa0c47
|
|
4
3
|
PluginImporter:
|
|
5
4
|
externalObjects: {}
|
|
6
5
|
serializedVersion: 2
|
|
@@ -21,6 +20,7 @@ PluginImporter:
|
|
|
21
20
|
Exclude Editor: 1
|
|
22
21
|
Exclude Linux64: 1
|
|
23
22
|
Exclude OSXUniversal: 1
|
|
23
|
+
Exclude WebGL: 1
|
|
24
24
|
Exclude Win: 1
|
|
25
25
|
Exclude Win64: 1
|
|
26
26
|
Exclude iOS: 0
|
|
@@ -72,7 +72,7 @@ PluginImporter:
|
|
|
72
72
|
second:
|
|
73
73
|
enabled: 1
|
|
74
74
|
settings:
|
|
75
|
-
AddToEmbeddedBinaries:
|
|
75
|
+
AddToEmbeddedBinaries: true
|
|
76
76
|
CPU: AnyCPU
|
|
77
77
|
CompileFlags:
|
|
78
78
|
FrameworkDependencies:
|
package/Plugins/iOS.meta
CHANGED
package/Plugins.meta
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
#if UNITY_ANDROID || UNITY_IOS
|
|
2
|
+
|
|
3
|
+
namespace XD.SDK.Payment.Internal.Mobile
|
|
2
4
|
{
|
|
3
5
|
public class PaymentConstants
|
|
4
6
|
{
|
|
@@ -10,12 +12,6 @@ namespace XD.SDK.Payment
|
|
|
10
12
|
public static int USER_CANCEL = 1;
|
|
11
13
|
public static int PURCHASE_PROCESSING = 2;
|
|
12
14
|
}
|
|
13
|
-
|
|
14
|
-
internal static class PayTypeInternal
|
|
15
|
-
{
|
|
16
|
-
public const string ALIPAY = "Alipay";
|
|
17
|
-
public const string WECHAT_PAY = "WeChatPay";
|
|
18
|
-
public const string CLOUD_QUICK_PAY = "CloudQuickPay";
|
|
19
|
-
}
|
|
20
15
|
}
|
|
21
|
-
}
|
|
16
|
+
}
|
|
17
|
+
#endif
|