修正内购流程中的一些bug
This commit is contained in:
parent
8b7fa5fe0b
commit
eaa77a3a10
@ -19,9 +19,6 @@
|
|||||||
|
|
||||||
static Utilities *utility = nil;
|
static Utilities *utility = nil;
|
||||||
|
|
||||||
@interface UIViewController (Purchase)
|
|
||||||
@property (nonatomic) NSString *currentFunId;
|
|
||||||
@end
|
|
||||||
|
|
||||||
@implementation UIViewController (Purchase)
|
@implementation UIViewController (Purchase)
|
||||||
-(void)initPurchaseEnv {
|
-(void)initPurchaseEnv {
|
||||||
@ -124,22 +121,23 @@ static Utilities *utility = nil;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// check if currentFunId is empty
|
// check if currentFunId is empty
|
||||||
if (self.currentFunId != nil && ![self.currentFunId isEqualToString:@""]) {
|
if ([StoreObserver sharedInstance].funid != nil && ![[StoreObserver sharedInstance].funid isEqualToString:@""]) {
|
||||||
NSLog(@"beginBy with currentFunId: %@", self.currentFunId);
|
NSLog(@"beginBy with currentFunId: %@", [StoreObserver sharedInstance].funid);
|
||||||
[self nativeCb:funId hasErr:YES dataStr:@"other purchase is processing"];
|
[self nativeCb:funId hasErr:YES dataStr:@"other purchase is processing"];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self.currentFunId = funId;
|
|
||||||
|
[StoreObserver sharedInstance].funid = funId;
|
||||||
SKProduct *product = [[StoreManager sharedInstance] productMatchingIdentifier: productId];
|
SKProduct *product = [[StoreManager sharedInstance] productMatchingIdentifier: productId];
|
||||||
if (product == nil) {
|
if (product == nil) {
|
||||||
NSLog(@"beginBy with empty product: %@", productId);
|
NSLog(@"beginBy with empty product: %@", productId);
|
||||||
self.currentFunId = nil;
|
[StoreObserver sharedInstance].funid = nil;
|
||||||
[self nativeCb:funId hasErr:YES dataStr:@"beginBy with empty product"];
|
[self nativeCb:funId hasErr:YES dataStr:@"beginBy with empty product"];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (orderId == nil || [orderId isEqualToString:@""]) {
|
if (orderId == nil || [orderId isEqualToString:@""]) {
|
||||||
NSLog(@"beginBy with empty orderId: %@", orderId);
|
NSLog(@"beginBy with empty orderId: %@", orderId);
|
||||||
self.currentFunId = nil;
|
[StoreObserver sharedInstance].funid = nil;
|
||||||
[self nativeCb:funId hasErr:YES dataStr:@"beginBy with empty orderId"];
|
[self nativeCb:funId hasErr:YES dataStr:@"beginBy with empty orderId"];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -173,10 +171,11 @@ static Utilities *utility = nil;
|
|||||||
NSDictionary* dic = notification.userInfo;
|
NSDictionary* dic = notification.userInfo;
|
||||||
NSNumber *errcode = dic[@"errcode"];
|
NSNumber *errcode = dic[@"errcode"];
|
||||||
NSLog(@"handlePurchaseNotification status: %@", errcode);
|
NSLog(@"handlePurchaseNotification status: %@", errcode);
|
||||||
|
NSString *funid = [StoreObserver sharedInstance].funid;
|
||||||
|
[StoreObserver sharedInstance].funid = nil;
|
||||||
// check if errcode is zero or not
|
// check if errcode is zero or not
|
||||||
self.currentFunId = nil;
|
|
||||||
if (errcode != nil && [errcode intValue] != 0) {
|
if (errcode != nil && [errcode intValue] != 0) {
|
||||||
[self nativeCb:self.currentFunId hasErr:YES dataStr: [NSString stringWithFormat:@"%@", dic[@"errmsg"]]];
|
[self nativeCb:funid hasErr:YES dataStr: [NSString stringWithFormat:@"%@", dic[@"errmsg"]]];
|
||||||
} else {
|
} else {
|
||||||
NSString *tid = dic[@"dataid"];
|
NSString *tid = dic[@"dataid"];
|
||||||
NSMutableArray *transactions = [[NSMutableArray alloc] init];
|
NSMutableArray *transactions = [[NSMutableArray alloc] init];
|
||||||
@ -184,7 +183,8 @@ static Utilities *utility = nil;
|
|||||||
NSError *error;
|
NSError *error;
|
||||||
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:transactions options:NSJSONWritingPrettyPrinted error:&error];
|
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:transactions options:NSJSONWritingPrettyPrinted error:&error];
|
||||||
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
|
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
|
||||||
[self nativeCb:self.currentFunId hasErr:NO dataStr: jsonString];
|
[self nativeCb:funid hasErr:NO dataStr: jsonString];
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -270,8 +270,8 @@
|
|||||||
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "44"
|
startingLineNumber = "41"
|
||||||
endingLineNumber = "44"
|
endingLineNumber = "41"
|
||||||
landmarkName = "-queryProducts:products:"
|
landmarkName = "-queryProducts:products:"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -286,28 +286,12 @@
|
|||||||
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "97"
|
startingLineNumber = "94"
|
||||||
endingLineNumber = "97"
|
endingLineNumber = "94"
|
||||||
landmarkName = "-queryProducts:products:"
|
landmarkName = "-queryProducts:products:"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
<BreakpointProxy
|
|
||||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
||||||
<BreakpointContent
|
|
||||||
uuid = "4FBF6B08-08A0-4695-995A-211586F5A6CF"
|
|
||||||
shouldBeEnabled = "No"
|
|
||||||
ignoreCount = "0"
|
|
||||||
continueAfterRunningActions = "No"
|
|
||||||
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
|
||||||
startingColumnNumber = "9223372036854775807"
|
|
||||||
endingColumnNumber = "9223372036854775807"
|
|
||||||
startingLineNumber = "25"
|
|
||||||
endingLineNumber = "25"
|
|
||||||
landmarkName = "unknown"
|
|
||||||
landmarkType = "0">
|
|
||||||
</BreakpointContent>
|
|
||||||
</BreakpointProxy>
|
|
||||||
<BreakpointProxy
|
<BreakpointProxy
|
||||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
<BreakpointContent
|
<BreakpointContent
|
||||||
@ -318,8 +302,8 @@
|
|||||||
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "74"
|
startingLineNumber = "71"
|
||||||
endingLineNumber = "74"
|
endingLineNumber = "71"
|
||||||
landmarkName = "-queryProducts:products:"
|
landmarkName = "-queryProducts:products:"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -334,8 +318,8 @@
|
|||||||
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "46"
|
startingLineNumber = "43"
|
||||||
endingLineNumber = "46"
|
endingLineNumber = "43"
|
||||||
landmarkName = "-queryProducts:products:"
|
landmarkName = "-queryProducts:products:"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -350,8 +334,8 @@
|
|||||||
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "80"
|
startingLineNumber = "77"
|
||||||
endingLineNumber = "80"
|
endingLineNumber = "77"
|
||||||
landmarkName = "-queryProducts:products:"
|
landmarkName = "-queryProducts:products:"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -382,8 +366,8 @@
|
|||||||
filePath = "purchase/StoreObserver.m"
|
filePath = "purchase/StoreObserver.m"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "131"
|
startingLineNumber = "132"
|
||||||
endingLineNumber = "131"
|
endingLineNumber = "132"
|
||||||
landmarkName = "-paymentQueue:updatedTransactions:"
|
landmarkName = "-paymentQueue:updatedTransactions:"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -392,14 +376,14 @@
|
|||||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
<BreakpointContent
|
<BreakpointContent
|
||||||
uuid = "6E8F3D37-5AC6-454A-8526-57B1C343F168"
|
uuid = "6E8F3D37-5AC6-454A-8526-57B1C343F168"
|
||||||
shouldBeEnabled = "No"
|
shouldBeEnabled = "Yes"
|
||||||
ignoreCount = "0"
|
ignoreCount = "0"
|
||||||
continueAfterRunningActions = "No"
|
continueAfterRunningActions = "No"
|
||||||
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "111"
|
startingLineNumber = "108"
|
||||||
endingLineNumber = "111"
|
endingLineNumber = "108"
|
||||||
landmarkName = "-queryPurchase:"
|
landmarkName = "-queryPurchase:"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -408,14 +392,14 @@
|
|||||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
<BreakpointContent
|
<BreakpointContent
|
||||||
uuid = "298A81F7-4B66-40D1-8EA3-BE7606FB25D2"
|
uuid = "298A81F7-4B66-40D1-8EA3-BE7606FB25D2"
|
||||||
shouldBeEnabled = "Yes"
|
shouldBeEnabled = "No"
|
||||||
ignoreCount = "0"
|
ignoreCount = "0"
|
||||||
continueAfterRunningActions = "No"
|
continueAfterRunningActions = "No"
|
||||||
filePath = "purchase/StoreObserver.m"
|
filePath = "purchase/StoreObserver.m"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "190"
|
startingLineNumber = "191"
|
||||||
endingLineNumber = "190"
|
endingLineNumber = "191"
|
||||||
landmarkName = "-handleTransactionPurchased:"
|
landmarkName = "-handleTransactionPurchased:"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -430,8 +414,8 @@
|
|||||||
filePath = "purchase/StoreObserver.m"
|
filePath = "purchase/StoreObserver.m"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "50"
|
startingLineNumber = "51"
|
||||||
endingLineNumber = "50"
|
endingLineNumber = "51"
|
||||||
landmarkName = "-getAppReceipt"
|
landmarkName = "-getAppReceipt"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -446,8 +430,8 @@
|
|||||||
filePath = "purchase/StoreObserver.m"
|
filePath = "purchase/StoreObserver.m"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "56"
|
startingLineNumber = "57"
|
||||||
endingLineNumber = "56"
|
endingLineNumber = "57"
|
||||||
landmarkName = "-getAppReceipt"
|
landmarkName = "-getAppReceipt"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -462,8 +446,8 @@
|
|||||||
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "158"
|
startingLineNumber = "156"
|
||||||
endingLineNumber = "158"
|
endingLineNumber = "156"
|
||||||
landmarkName = "-alertWithTitle:message:"
|
landmarkName = "-alertWithTitle:message:"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -478,8 +462,8 @@
|
|||||||
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "159"
|
startingLineNumber = "157"
|
||||||
endingLineNumber = "159"
|
endingLineNumber = "157"
|
||||||
landmarkName = "-alertWithTitle:message:"
|
landmarkName = "-alertWithTitle:message:"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -494,8 +478,8 @@
|
|||||||
filePath = "purchase/StoreObserver.m"
|
filePath = "purchase/StoreObserver.m"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "206"
|
startingLineNumber = "207"
|
||||||
endingLineNumber = "206"
|
endingLineNumber = "207"
|
||||||
landmarkName = "-handleTransactionFailed:"
|
landmarkName = "-handleTransactionFailed:"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -504,14 +488,14 @@
|
|||||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
<BreakpointContent
|
<BreakpointContent
|
||||||
uuid = "15FCA0D4-7E42-43F6-9DC2-FB0643322A2D"
|
uuid = "15FCA0D4-7E42-43F6-9DC2-FB0643322A2D"
|
||||||
shouldBeEnabled = "Yes"
|
shouldBeEnabled = "No"
|
||||||
ignoreCount = "0"
|
ignoreCount = "0"
|
||||||
continueAfterRunningActions = "No"
|
continueAfterRunningActions = "No"
|
||||||
filePath = "purchase/StoreObserver.m"
|
filePath = "purchase/StoreObserver.m"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "264"
|
startingLineNumber = "265"
|
||||||
endingLineNumber = "264"
|
endingLineNumber = "265"
|
||||||
landmarkName = "-onPurchaseResult:errorCode:errorDescription:"
|
landmarkName = "-onPurchaseResult:errorCode:errorDescription:"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -548,5 +532,85 @@
|
|||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
uuid = "BD2882FC-C072-4CE1-844A-B339C7AF21D9"
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "115"
|
||||||
|
endingLineNumber = "115"
|
||||||
|
landmarkName = "-beginBuy:productId:orderId:"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
uuid = "A6E70BD2-FECB-4683-A170-4830D7CB026B"
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "124"
|
||||||
|
endingLineNumber = "124"
|
||||||
|
landmarkName = "-beginBuy:productId:orderId:"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
uuid = "820583EC-CE7D-4683-BC79-64E9EEBA6287"
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "purchase/StoreObserver.m"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "266"
|
||||||
|
endingLineNumber = "266"
|
||||||
|
landmarkName = "-onPurchaseResult:errorCode:errorDescription:"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
uuid = "F35AF2EC-613F-4489-AD46-ABA9D1D2EFD9"
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "173"
|
||||||
|
endingLineNumber = "173"
|
||||||
|
landmarkName = "-handlePurchaseNotification:"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
uuid = "4E1E964B-B983-4D31-A79F-BEA739EE307B"
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Classes_cocos/UIViewController+Purchase.mm"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "180"
|
||||||
|
endingLineNumber = "180"
|
||||||
|
landmarkName = "-handlePurchaseNotification:"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
</Breakpoints>
|
</Breakpoints>
|
||||||
</Bucket>
|
</Bucket>
|
||||||
|
@ -2,6 +2,14 @@
|
|||||||
<VariablesViewState
|
<VariablesViewState
|
||||||
version = "1.0">
|
version = "1.0">
|
||||||
<ContextStates>
|
<ContextStates>
|
||||||
|
<ContextState
|
||||||
|
contextName = "-[UIViewController(Purchase) beginBuy:productId:orderId:]:UIViewController+Purchase.mm">
|
||||||
|
<PersistentStrings>
|
||||||
|
<PersistentString
|
||||||
|
value = "self.currentFunId">
|
||||||
|
</PersistentString>
|
||||||
|
</PersistentStrings>
|
||||||
|
</ContextState>
|
||||||
<ContextState
|
<ContextState
|
||||||
contextName = "-[StoreObserver handlePurchasedTransaction:]:StoreObserver.m">
|
contextName = "-[StoreObserver handlePurchasedTransaction:]:StoreObserver.m">
|
||||||
<PersistentStrings>
|
<PersistentStrings>
|
||||||
|
File diff suppressed because one or more lines are too long
@ -20,6 +20,7 @@ Implements the SKPaymentTransactionObserver protocol. Handles purchasing and res
|
|||||||
|
|
||||||
/// Indicates the cause of the purchase failure.
|
/// Indicates the cause of the purchase failure.
|
||||||
@property(nonatomic, copy) NSString *message;
|
@property(nonatomic, copy) NSString *message;
|
||||||
|
@property(nonatomic, copy) NSString *funid;
|
||||||
|
|
||||||
/// Keeps track of all purchases.
|
/// Keeps track of all purchases.
|
||||||
@property(strong) NSMutableArray *productsPurchased;
|
@property(strong) NSMutableArray *productsPurchased;
|
||||||
@ -46,4 +47,7 @@ Implements the SKPaymentTransactionObserver protocol. Handles purchasing and res
|
|||||||
|
|
||||||
- (NSString *)getAppReceipt;
|
- (NSString *)getAppReceipt;
|
||||||
|
|
||||||
|
- (NSString *)getFunID;
|
||||||
|
- (void) updateFunId: (NSString *) funid;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
_pendingTransactions = [[NSMutableDictionary alloc] init];
|
_pendingTransactions = [[NSMutableDictionary alloc] init];
|
||||||
_finishedTransactions = [[NSMutableSet alloc] init];
|
_finishedTransactions = [[NSMutableSet alloc] init];
|
||||||
_status = PCSPurchaseStatusNone;
|
_status = PCSPurchaseStatusNone;
|
||||||
|
_funid = nil;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@ -110,7 +111,7 @@
|
|||||||
// payment.applicationUsername = orderId;
|
// payment.applicationUsername = orderId;
|
||||||
// generate UUID for order id
|
// generate UUID for order id
|
||||||
NSString *testOrderId = [[NSUUID UUID] UUIDString];
|
NSString *testOrderId = [[NSUUID UUID] UUIDString];
|
||||||
[payment performSelector: @selector(setApplicationUsername:) withObject: testOrderId];
|
[payment performSelector: @selector(setApplicationUsername:) withObject: orderId];
|
||||||
[[SKPaymentQueue defaultQueue] addPayment:payment];
|
[[SKPaymentQueue defaultQueue] addPayment:payment];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,5 +273,13 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)updateFunId:(NSString *)funid {
|
||||||
|
_funid = funid;
|
||||||
|
}
|
||||||
|
|
||||||
|
-(NSString *) getFunID{
|
||||||
|
return _funid;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user