51 #import "MVerifyStoreReceipt.h"
54 #import "MProductAgent.h"
58 #define PURCHASE_ERROR_KEY @"購入に失敗しました。再度手続きしてください。"
59 #define STORE_SESSION_ERROR_KEY @"AppStoreとの接続に失敗しました。再度手続きしてください。"
60 #define RESTORE_ERROR_KEY @"復元処理に失敗しました。再度お手続きをしてください。"
61 #define RESTORE_CHANCEL_KEY @"復元処理がキャンセルされました。再度お手続きをしてください。"
62 #define RESTORE_COMPLETE_KEY @"購入を復元しました。\r\n他の全ての復元可能なアイテムを復元しました。"
63 #define RESTORE_COMPLETE_ALL_KEY @"全ての復元可能なアイテムを復元しました。"
64 #define RESTORE_COMPLETE_ERROR_KEY @"復元可能なアイテムがありませんでした。"
65 #define PURCHASE_LIMITED_ERROR_KEY @"アプリ内でのアイテム購入が制限されています。"
66 #define PURCHASE_NOW_WAIT_KEY @"購入手続き中..."
67 #define PURCHASE_WAIT_KEY @"APP STOREに確認中..."
68 #define PURCHASE_FINISH_WAIT_KEY @"購入履歴チェック中..."
69 #define PURCHASE_CHANCEL_KEY @"購入処理がキャンセルされました。再度お手続きをしてください。"
71 @class SKPaymentTransaction;
73 typedef void (*send_type)(
void*, SEL,
void*,
void*,
void*,
void*,
void*);
74 typedef void (^MPurchaseReturnDelegateBlock)();
75 typedef void (^MPurchaseDelegateBlock)(SKPaymentTransaction *transaction, NSString *verifyStatus, NSString *base64Receipt, BOOL expiered, NSString *expierDateGMTStr, MPurchaseReturnDelegateBlock finishTransaction);
81 @property (nonatomic, unsafe_unretained) NSObject<MPurchaseDelegate>*delegate;
86 + (id)sharedInstance:(NSString *)argSharedSecret;
90 + (void)startPaymentTransactionObserver;
92 + (void)finishTransaction:(SKPaymentTransaction *)argTransaction;
97 - (void)verifyReceipt:(SKPaymentTransaction *)argTransaction :(BOOL)argRestored :(
void (^)(NSDictionary *receiptDic))argCompletion;
99 - (void)verifyReceiptForRemote:(SKPaymentTransaction *)argTransaction :(BOOL)argRestored :(
void (^)(NSDictionary *receiptDic))argCompletion;
101 - (void)verifyReceiptForLocal:(SKPaymentTransaction *)argTransaction :(BOOL)argRestored :(
void (^)(NSDictionary *receiptDic))argCompletion;
104 - (void)purchaseWithProduct:(SKProduct *)argProduct :(MProductType)argProductType :(MPurchaseDelegateBlock)argPurchaseComplation :(MPurchaseDelegateBlock)argRestoreComplation;
106 - (void)purchaseWithProductID:(NSString *)argProductID :(MProductType)argProductType :(MPurchaseDelegateBlock)argPurchaseComplation :(MPurchaseDelegateBlock)argRestoreComplation;
108 - (void)purchaseWithProduct:(SKProduct *)argProduct;
110 - (void)purchaseWithProductID:(NSString *)argProductID;
119 - (void)entryWithProduct:(SKProduct *)argProduct :(MProductType)argProductType :(MPurchaseDelegateBlock)argPurchaseComplation :(MPurchaseDelegateBlock)argRestoreComplation;
121 - (void)entryWithProductID:(NSString *)argProductID :(MProductType)argProductType :(MPurchaseDelegateBlock)argPurchaseComplation :(MPurchaseDelegateBlock)argRestoreComplation;
131 - (void)notifySKRequestFailWithError:(NSError *)argError;
133 - (void)notifyPurchaseLimitedError:(NSString *)argErrorMsg;
135 - (void)notifyRestoreError:(SKPaymentQueue *)argQueue :(NSError *)argError;
137 - (void)notifyRestoreCompleate:(SKPaymentQueue *)argQueue :(NSNumber*)argRestoreCntNumber;
141 - (void)notifyStartPurchaseTransaction:(SKProduct *)product;
143 - (void)notifyStartRestoreTransaction:(SKProduct *)product;
145 - (void)notifyFinishPurchaseTransaction:(SKPaymentTransaction *)transaction :(NSString *)verifyStatus :(NSString *)base64Receipt :(BOOL)expiered :(NSDate *)expierDate;
147 - (void)notifyFinishFaildTransaction:(SKPaymentTransaction *)transaction;
149 - (void)notifyFinishRestoreTransaction:(SKPaymentTransaction *)transaction :(NSString *)verifyStatus :(NSString *)base64Receipt :(BOOL)expiered :(NSDate *)expierDate;
151 - (void)notifyFinishCancelTransaction:(SKPaymentTransaction *)transaction;
153 - (void)notifyFinishDeferredTransaction:(SKPaymentTransaction *)transaction;
Definition: MPurchaseAgent.h:78
Definition: MPurchaseAgent.h:126