Socket
Book a DemoInstallSign in
Socket

iapp_validator

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iapp_validator

0.1.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

IappValidator

IappValidator is a Ruby gem that facilitates purchase verification for Google Play. It leverages the Google Play Developer API to confirm whether a purchase is valid or not.

πŸ“¦ Installation

Add the gem to your application's Gemfile:

gem 'iapp_validator'

Then run:

bundle install

πŸ” Configuration

To verify Google Play purchases, you need a Google Play Service Account JSON key.

  • Go to Google Cloud Console.
  • Create a Service Account and grant it "Android Publisher" permissions.
  • Download the JSON key file.
  • Place it in your app (e.g., config/credentials/google_play_service_account.json).

πŸš€ Usage

require 'iapp_validator'

validator = ReceiptHelper::GooglePlayValidator.new
result = validator.verify_purchase("com.package.name", "your.product.id", "purchase_token")

if result[:success]
  puts "Purchase is valid"
else
  puts "Purchase failed: #{result[:error]}"
end

βœ… verify_purchase(package_name, product_id, token) Parameters

  • package_name: The package name of your app on Google Play (e.g., com.katkatgames.kanbiztoupatou)
  • product_id: The ID of the purchased product (e.g., coins_100)
  • token: The purchase token returned from the Google Play API.

πŸ›  Development

To install the gem locally:

bundle exec rake install

To open an interactive console:

bin/console

🀝 Contributing

Pull requests, bug reports, and suggestions are welcome! Please follow the Code of Conduct.

πŸ“„ License

This gem is licensed under the MIT License.

FAQs

Package last updated on 12 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.