TIAPurchase Class Reference
Inherits from | NSObject |
Declared in | TIAPurchase.h |
Overview
@class TIAPurchase
@abstract The ‘TIAPurchase’ represents a single connection to In App Purchase to service a request.
Tasks
-
+ setDebugMode:
-
+ registerAppId:error:
-
+ registerStoreId:error:
-
+ registerServerPhase:error:
-
+ registerUserId:error:
-
+ startPurchaseWithViewController:itemId:completionHandler:
-
+ purchasesWithCompletionHandler:
-
+ itemListWithCompletionHandler:
-
+ itemListFromTestMode:WithCompletionHandler:
-
+ getTCConsoleItemsWithCompletionHandler:
-
+ processesIncompletePurchasesWithCompletionHandler:
Class Methods
getTCConsoleItemsWithCompletionHandler:
@method
+ (instancetype)getTCConsoleItemsWithCompletionHandler:(TIARequestHandler)handler
Parameters
- handler
handler’s result has that translation of JSON data to ‘NSArray’
Return Value
data of array] itemSeq - item id itemName - item name usingStatus - item status on IAP server regYmdt - item registration date on IAP server appName - app name marketId - market id (AS : APPLE STORE) marketItemId - market item id (product id)
Discussion
@method
@abstract Request for item list which is registered in webConsole but not in itunesConnect
Declared In
TIAPurchase.h
itemListFromTestMode:WithCompletionHandler:
@method
+ (instancetype)itemListFromTestMode:(BOOL)testMode WithCompletionHandler:(TIARequestHandler)handler
Parameters
- handler
handler’s result has that translation of JSON data to ‘NSArray’
Return Value
data of array] itemSeq - item id itemName - item name usingStatus - item status on IAP server regYmdt - item registration date on IAP server appName - app name marketId - market id (AS : APPLE STORE, ONGATE : ONGATE STORE) marketItemId - market item id (product id) currency - represent to item currency price - represent to item price
Discussion
@method
@abstract Request for item list which is registered in webConsole and in itunesConnect especially if storeID is ‘ONGATE’ in testmode, you can get item’s currency, price from test server
Declared In
TIAPurchase.h
itemListWithCompletionHandler:
@method
+ (instancetype)itemListWithCompletionHandler:(TIARequestHandler)handler
Parameters
- handler
handler’s result has that translation of JSON data to ‘NSArray’
Return Value
data of array] itemSeq - item id itemName - item name usingStatus - item status on IAP server regYmdt - item registration date on IAP server appName - app name marketId - market id (AS : APPLE STORE) marketItemId - market item id (product id) currency - represent to item currency price - represent to item price
Discussion
@method
@abstract Request for item list which is registered in webConsole and in itunesConnect
Declared In
TIAPurchase.h
processesIncompletePurchasesWithCompletionHandler:
@method
+ (instancetype)processesIncompletePurchasesWithCompletionHandler:(TIARequestHandler)handler
Parameters
- handler
handler’s result has that translation of JSON data to ‘NSDictionany’
Return Value
data of NSDictionany] successList - success data of ‘NSArray’ failList - fail data of ‘NSArray’ [list data of NSArray(successList or failList)] paymentSeq - generated payment id itemSeq - represent item id purchaseToken - represent token for validation marketItemId - market item id (product id) currency - represent to item currency price - represent to item price
Discussion
@method
@abstract Request processes IncompletePurchases
Declared In
TIAPurchase.h
purchasesWithCompletionHandler:
@method
+ (instancetype)purchasesWithCompletionHandler:(TIARequestHandler)handler
Parameters
- handler
handler’s result has that translation of JSON data to ‘NSArray’
Return Value
data of array] paymentSeq - generated payment id itemSeq - represent item id purchaseToken - represent token for validation.
Discussion
@method
@abstract Request purchases, Purchases means the payment is successfully completed, Does not appear in later history is consumed by 3rd party server.
Declared In
TIAPurchase.h
registerAppId:error:
@method
+ (BOOL)registerAppId:(NSString *)appId error:(NSError **)error
Parameters
- appId
represent appId which is registered in Web Console
- error
The ‘NSError’ representing any error that occured
Discussion
@method
@abstract Simple method to regist appId
Declared In
TIAPurchase.h
registerServerPhase:error:
@method
+ (BOOL)registerServerPhase:(NSString *)serverPhase error:(NSError **)error
Parameters
- serverPhase
represent server phase. you can register ‘ALPHA’ or ‘BETA’ or ‘REAL’ (default. REAL)
- error
The ‘NSError’ representing any error that occured
Discussion
@method
@abstract Simple method to server phase
Declared In
TIAPurchase.h
registerStoreId:error:
@method
+ (BOOL)registerStoreId:(NSString *)storeId error:(NSError **)error
Parameters
- storeId
represent storeId. you can register ‘AS’ or ‘ONGATE’
- error
The ‘NSError’ representing any error that occured
Discussion
@method
@abstract Simple method to regist store id
Declared In
TIAPurchase.h
registerUserId:error:
@method
+ (BOOL)registerUserId:(NSString *)userId error:(NSError **)error
Parameters
- userId
represent to user identification
- error
The ‘NSError’ representing any error that occurred.
Discussion
@method
@abstract Simple method to register user identification.
Declared In
TIAPurchase.h
setDebugMode:
@method
+ (void)setDebugMode:(BOOL)isDebuggable
Parameters
- isDebuggable
if isDebuggable value is true, Enable to debug mode
Discussion
@method
@abstract Enable debug mode
Declared In
TIAPurchase.h
startPurchaseWithViewController:itemId:completionHandler:
@method
+ (instancetype)startPurchaseWithViewController:(UIViewController *)baseViewController itemId:(long)itemId completionHandler:(TIARequestHandler)handler
Parameters
- baseViewController
represent to current view controller
- itemId
represent to item id
- handler
handler’s result has that translation of JSON data to ‘NSDictionany’
Return Value
data] paymentSeq - generated payment id itemSeq - represent item id purchaseToken - represent token for validation.
Discussion
@method
@abstract Starts a request for purchase process
Declared In
TIAPurchase.h