Safe Haskell | None |
---|---|
Language | Haskell2010 |
Network.IAP.Verifier
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.
- data IAPSettings = IAPSettings {}
- defaultIAPSettings :: IAPSettings
- sandboxIAPSettings :: IAPSettings
- data Result = Result {}
- data IAPException
- verify :: IAPSettings -> ByteString -> IO Result
Settings
defaultIAPSettings :: IAPSettings Source
IAPSettings
for production.
sandboxIAPSettings :: IAPSettings Source
IAPSettings
for development.
Result
A result of verify
.
Exception
data IAPException Source
Exceptions thrown by verify
.
Constructors
UnknownJSONException | |
Fields | |
NoResponseException |
Instances
Action
verify :: IAPSettings -> ByteString -> IO Result Source
Verify your receipt.
Throw IAPException
when request is failed.