GithubHelp home page GithubHelp logo

marucjmar / dolla Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zovafit/dolla

0.0 2.0 0.0 70 KB

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

Home Page: https://hex.pm/packages/dolla

License: BSD 3-Clause "New" or "Revised" License

Elixir 100.00%

dolla's Introduction

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.

dolla's People

Contributors

jklp avatar mootpointer avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.