iap-verifier-0.1.0.1: A simple wrapper of In-App-Purchase receipt validate APIs.

Safe HaskellNone
LanguageHaskell2010

Network.IAP.Verifier

Contents

Description

This module is a simple wrapper of AppStore In-App-Purchase Receipt Validate APIs. Example:

import Network.IAP.Verifier
main :: IO ()
main = do
  receipt <- readFile "./receipt"
  result <- verify defaultIAPSettings receipt
  case result of
    0 -> putStrLn "OK"
    _ -> putStrLn "Fail"

For more information, please see https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Introduction.html.

Synopsis

Settings

data IAPSettings Source

In-App-Purchase Verify Settings.

Constructors

IAPSettings 

Fields

verifyUrl :: String
 

Instances

Result

data Result Source

A result of verify.

Constructors

Result 

Fields

status :: Int
 

Exception

Action

verify :: IAPSettings -> ByteString -> IO Result Source

Verify your receipt. Throw IAPException when request is failed.