Sha256: 33941a3845a3115e419bd11ce1609e80cd3b08527402969c339223daf1f82b06

Contents?: true

Size: 1.36 KB

Versions: 1

Compression:

Stored size: 1.36 KB

Contents

Verona is a simple gem for verifying Google Play In-App Purchase tokens, and retrieving the information associated with the purchase.

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.

Verona is based on [@mattt's](http://twitter.com/mattt) [Venice](https://github.com/nomad/venice) gem for iOS In-App Purchase verification.

## Installation

    $ gem install verona

## Usage

First, ensure that you have a valid the following environment variables set up:

- `GOOGLE_PLAY_CLIENT_ID`
- `GOOGLE_PLAY_CLIENT_SECRET`
- `GOOGLE_PLAY_REFRESH_TOKEN`

You can get these from The [Google Developer Website](https://developers.google.com/android-publisher/authorization).

```ruby
require 'verona'

if receipt = Verona::Receipt.verify({
            :package_name => "com.mycompany.app",
            :product_id => "com.mycompany.app.iap",
            :token => "token"
        })
  p receipt.to_h
end
```

## Contact

Simon Maddox

- http://github.com/simonmaddox
- http://twitter.com/simonmaddox
- simon@simonmaddox.com

## License

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
verona-0.0.2 ./README.md