Project

aliquot

0.0
Low commit activity in last 3 years
No release in over a year
Validates Google Pay tokens
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 3
~> 0.14.1

Runtime

~> 0.71.0
~> 0.3
 Project Readme

Aliquot

CircleCI Gem Version

Example usage

For usage examples it's best to look at unit tests. As an example from dummy_spec.rb.

# token_string::  Google Pay token (JSON string)
# shared_secret:: Base64 encoded shared secret (EC Public key)
# recipient_id::  Google Pay recipient ID ("<PREFIX e.g. merchant>:<SOMETHING>")
a = Aliquot::Payment.new(token_string, shared_secret, recipient_id)
a.process

Unit tests

To be sure that unit tests run properly, you can run them in a Docker container.

docker run -ti --rm -v $(pwd):/opt/aliquot ruby:2.7.4 bash
cd /opt/aliquot
bundle install
bundle exec rspec
exit

Publishing new Gem

Beware of cyclic dependency with aliquot-pay. Update the new versions for these gems in parallel.

  1. Update ./aliquot.gemspec

    Gem::Specification.new do |s|
      s.name     = 'aliquot'
      s.version  = '${NEW_ALIQUOT_VERSION}'
      ...
      s.add_development_dependency 'aliquot-pay', '~> ${NEW_ALIQUOT-PAY_VERSION}'
      ...
    end
  2. Run the following

    gem build
    gem push aliquot-${NEW_ALIQUOT_VERSION}.gem
  3. Then do the same for aliquot-pay if not already done.