-
Notifications
You must be signed in to change notification settings - Fork 4
/
iAPVerification.h
37 lines (26 loc) · 1.33 KB
/
iAPVerification.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
29
30
31
32
33
34
35
36
37
//
// iAPVerification.h
//
// Created by Max Bäumle.
// Copyright (c) 2011-2012 Max Bäumle. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <StoreKit/StoreKit.h>
typedef enum {
iAPTransactionMissing, // paymentTransaction object missing
iAPVerificationFailed,
iAPConnectionFailed, // Server connection failed
} iAPErrorCode;
@interface iAPVerification : NSObject
+ (void)verifyPurchase:(SKPaymentTransaction *)paymentTransaction isSandbox:(BOOL)sandbox delegate:(id)delegate;
+ (void)verifyPurchase:(SKPaymentTransaction *)paymentTransaction serverUrl:(NSString *)urlString isSandbox:(BOOL)sandbox delegate:(id)delegate;
+ (BOOL)findBinaries; // Find binaries used for cracking on the device
@end
@protocol iAPVerificationDelegate <NSObject>
@optional
- (void)verificationFailed:(iAPErrorCode)errorCode error:(NSError *)error paymentTransaction:(SKPaymentTransaction *)paymentTransaction;
- (void)purchaseVerified:(NSDictionary *)dictionary paymentTransaction:(SKPaymentTransaction *)paymentTransaction; // Available keys: 'quantity', 'product_id', 'transaction_id', 'purchase_date', 'app_item_id', 'bid', 'bvrs'
/* DEPRECATED */
- (void)verificationFailed:(iAPErrorCode)errorCode error:(NSError *)error __attribute__((deprecated));
- (void)purchaseVerified:(NSDictionary *)dictionary __attribute__((deprecated));
@end