forked from sycx/MKStoreKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
VerificationController.h
28 lines (18 loc) · 985 Bytes
/
VerificationController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#import <Foundation/Foundation.h>
#import <StoreKit/StoreKit.h>
#define IS_IOS6_AWARE (__IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_5_1)
#define ITMS_PROD_VERIFY_RECEIPT_URL @"https://buy.itunes.apple.com/verifyReceipt"
#define ITMS_SANDBOX_VERIFY_RECEIPT_URL @"https://sandbox.itunes.apple.com/verifyReceipt";
#define KNOWN_TRANSACTIONS_KEY @"knownIAPTransactions"
#define ITC_CONTENT_PROVIDER_SHARED_SECRET @"your secret here"
char* base64_encode(const void* buf, size_t size);
void * base64_decode(const char* s, size_t * data_len);
@interface VerificationController : NSObject {
NSMutableDictionary *transactionsReceiptStorageDictionary;
}
+ (VerificationController *) sharedInstance;
// Checking the results of this is not enough.
// The final verification happens in the connection:didReceiveData: callback within
// this class. So ensure IAP feaures are unlocked from there.
- (BOOL)verifyPurchase:(SKPaymentTransaction *)transaction;
@end