Validation of payments and time adjustments in devtosev SDK for iOS

Payments validation

To be protected from fraudulent transactions, we recommend you to use devtodev Anticheat service.

Use this method, and devtodev will check the transaction's validity with the payment platform, and the response will be returned to the application.

[DevToDevCheat verifyPaymentWithCompletion:(void (^)(ReceiptStatus))completionBlock];

 

Result can take one of following values:

typedef enum {
    ReceiptValid,
    ReceiptNotValid,
    ReceiptServerError,
    ReceiptInternalError,
    ReceiptSandbox
} ReceiptStatus;

In case of successful check call the following main SDK method:

[DevToDev realPayment: (NSString *) transactionId withInAppPrice:(float) inAppPrice 
         andInAppName: (NSString *) inAppName andInAppCurrencyISOCode: (NSString *) inAppCurrencyISOCode];

Time cheats check

To check for time cheats call checkTime method every time when app is being launched

[DevToDevCheat checkTime: (void (^)(TimeStatus status)) completionBlock];

Result can take one of following values:

typedef enum {
    Valid,
    Forward,
    Rewind
} TimeStatus;

 

Secondary methods
Checking the events