Skip to content
/ dolla Public

Dolla provides a wrapper over Apple's app store receipt verification service in Elixir.

License

Notifications You must be signed in to change notification settings

zovafit/dolla

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dolla

Build Status

App Store Receipt IAP Verification in Elixir

Dolla provides a wrapper over Apple's app store receipt verification service in Elixir.

Illustrated sloth with caption: Dolla dolla bill, ya'll

It aims to be relatively thin, giving you structs to play with instead of having to deal withe logic and errors yourself.

Installation

If available in Hex, the package can be installed as:

  1. Add dolla to your list of dependencies in mix.exs:
def deps do
  [{:dolla, "~> 0.3.0"}]
end
  1. Ensure dolla is started before your application:
def application do
  [applications: [:dolla]]
end
  1. If you're verifying receipts with recurring subscriptions, configure the secret in your dev.exs and prod.exs respectively
config :dolla, :secret, "YOUR_SECRET"

Usage

Once you have your base64 encoded receipt data (see Apple's docs for more information), just pass them to Dolla.

iex> Dolla.verify("A MASSIVE BUNCH OF BASE64")
{:ok, %Dolla.Response{status: 0, receipt: %Dolla.Receipt{...}}...}

Dolla returns a tuple, so you're probably going to want to match on that. If you get :ok as the first element in the tuple, then your receipt has successfully validated.

About

Dolla provides a wrapper over Apple's app store receipt verification service in Elixir.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages