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
 Dependencies

Development

~> 2.0.0
~> 3

Runtime

>= 0.11.0, < 0.13
~> 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.3 bash
cd /opt/aliquot
bundle install
bundle exec rspec