0.0
Low commit activity in last 3 years
A long-lived project that still receives updates
Generates Google Pay test dummy tokens
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3

Runtime

~> 0.3
~> 3.0
 Project Readme

Aliquot-Pay

Gem Version

Generate Google Pay tokens to use for testing. Used for testing Aliquot.

Generate a token and associated values.

require 'aliquot-pay'

ap = AliquotPay.new(:ECv2)

token = ap.token

# Extract root signing keys in same form as Google supplies them.
signing_keys = ap.extract_root_signing_keys

# Extract shared secret as Base64
shared_secret = ap.shared_secret

# Extract (default) recipient id
recipient_id = ap.recipient_id

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-pay ruby:2.7.4 bash
cd /opt/aliquot-pay
bundle install
bundle exec rspec
exit

Publishing new Gem

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

  1. Update ./aliquot-pay.gemspec

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

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