Project

taler

0.0
No release in over 3 years
Create and refund orders through the Taler merchant backend API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
>= 0
>= 0
>= 0
>= 0
 Project Readme

GNU Taler payment API for Ruby

The Taler library let's you interact with a Taler merchant backend API to take payments.

Installation

gem install taler # or
bundle add taler

Usage

require "taler"

backend_url = "https://backend.demo.taler.net/instances/sandbox"
backend_password = "sandbox"

order = Taler::Order.new(backend_url:, password:)
order.create(
  amount: "KUDOS:4",
  summary: "Order total",
  fulfillment_message: "Thank you!"
)

puts "Pay at: #{order.status_url}"

while order.fetch("order_status") == "unpaid"
  sleep 1
  order.reload
end

if order.fetch("order_status") == "paid"
  puts "Great. All paid."
else
  puts "Sorry, the order is #{order.fetch("order_status")}. Try again."
end

Read more in the official documentation:

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake to run the tests. You can also run bin/console for an interactive prompt.

Release

  • Update the version number in lib/taler/version.rb.
  • Update the CHANGELOG.md file.
  • Commit.
  • Run bundle exec rake release to build, tag and push the gem.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/openfoodfoundation/taler-ruby.