MLReceiptManager Class Reference

Inherits from NSObject
Declared in MLReceiptManager.h

Overview

MLReceiptManager

+ verifyPaymentReceipt:completion:

MaxLeap validates the receipt with Apple and gives the result.

+ (void)verifyPaymentReceipt:(nullable NSData *)receiptData completion:(nullable MLBooleanResultBlock)block

Parameters

receiptData

The receipt data contained in a transaction.

block

the completion block will excute on main thread.

Discussion

MaxLeap validates the receipt with Apple and gives the result.

@code NSData *receipt = transaction.transactionReceipt;

[MLReceiptManager verifyPaymentReceipt:receipt completion:^(BOOL isValid, NSError *error) { if (isValid) { // the receipt is valid } else { // The receipt validating failed. if ([error.domain isEqualToString:MLErrorDomain] && error.code == kMLErrorInvalidAuthData) { // the receipt is invalid } else { // an error occured } } }]; @endcode

Declared In

MLReceiptManager.h