Safe Haskell | None |
---|---|
Language | Haskell2010 |
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.
- data IAPSettings = IAPSettings {}
- defaultIAPSettings :: IAPSettings
- sandboxIAPSettings :: IAPSettings
- data Result = Result {}
- data IAPException
- verify :: IAPSettings -> ByteString -> IO Result
Settings
data IAPSettings Source
In-App-Purchase Verify Settings.
defaultIAPSettings :: IAPSettings Source
IAPSettings
for production.
sandboxIAPSettings :: IAPSettings Source
IAPSettings
for development.
Result
Exception
data IAPException Source
Exceptions thrown by verify
.
Action
verify :: IAPSettings -> ByteString -> IO Result Source
Verify your receipt.
Throw IAPException
when request is failed.