receipt_verifier v0.5.0 ReceiptVerifier.Client

The HTTP Client to send request to App Store

Summary

Functions

Send the iTunes receipt to Apple Store, and parse the response as map

Functions

request(receipt, endpoint \\ "https://buy.itunes.apple.com/verifyReceipt")
request(String.t, String.t) :: {:ok, map} | {:error, any}

Send the iTunes receipt to Apple Store, and parse the response as map

Example

iex> ReceiptVerifier.Client.reuqest(base64_encoded_receipt_data)
...> {:ok, %{"status" => 0, "receipt" => receipt, "latest_receipt" => latest_receipt, "latest_receipt_info" => latest_receipt_info}}

Note: If you send sandbox receipt to production server, it will be auto resend to test server. Same for the production receipt.