Giter Club home page Giter Club logo

venice's Introduction

Venice

In-App Purchase Receipt Verification

Venice is a simple gem for verifying Apple In-App Purchase receipts, and retrieving the information associated with receipt data.

There are two reasons why you should verify in-app purchase receipts on the server: First, it allows you to keep your own records of past purchases, which is useful for up-to-the-minute metrics and historical analysis. Second, server-side verification over SSL is the most reliable way to determine the authenticity of purchasing records.

See Apple's In-App Purchase Programming Guide for additional information.

Venice is named for Venice, Italyβ€”or more specifically, Shakespeare's The Merchant of Venice.
It's part of a series of world-class command-line utilities for iOS development, which includes Cupertino (Apple Dev Center management), Shenzhen (Building & Distribution), Houston (Push Notifications), and Dubai (Passbook pass generation).

Installation

$ gem install venice

Usage

require 'venice'

data = "(Base64-Encoded Receipt Data)"
if receipt = Venice::Receipt.verify(data)
  p receipt.to_h
end

Comand Line Interface

Venice also comes with the iap binary, which provides a convenient way to verify receipts from the command line.

$ iap verify /path/to/receipt

+-----------------------------+-------------------------------+
|                           Receipt                           |
+-----------------------------+-------------------------------+
| app_item_id                 |                               |
| bid                         | com.foo.bar                   |
| bvrs                        | 20120427                      |
| original_purchase_date      | Sun, 01 Jan 2013 12:00:00 GMT |
| original_transaction_id     | 1000000000000001              |
| product_id                  | com.example.product           |
| purchase_date               | Sun, 01 Jan 2013 12:00:00 GMT |
| quantity                    | 1                             |
| transaction_id              | 1000000000000001              |
| version_external_identifier |                               |
+-----------------------------+-------------------------------+

Contact

Mattt Thompson

License

Venice is available under the MIT license. See the LICENSE file for more info.

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.