Project

rubyqrpay

0.01
No release in over 3 years
Low commit activity in last 3 years
Ruby prompt pay QR-code generator
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0

Runtime

~> 2.1
~> 1.3
~> 6.10
~> 0.10
 Project Readme

rubyQRpay

Installation

Add this line to your application's Gemfile:

gem 'rubyqrpay'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rubyqrpay

Usage

transaction_information = {
  agregator_id: 'rubyQRpay',
  merchant_account_32: {
    service_code_erip: '123456',
    payer_unique_id: '123456789',
    payer_number: '--',
    amount_edit_possibility: true,
  },
  merchant_account_33: {
    service_producer_code: '123',
    service_code: '--',
    outlet: '--',
    order_code: '--'
  },
  merchant_category_code: 2934,
  currency: 933,
  amount: 10.05,
  convenience_indicator: 1,
  fixed_fee: 0.01,
  percentage_fee: 12.0,
  country: 'BY',
  merchant_name: 'Ivan Ivanov',
  merchant_city: 'Minsk',
  postal_code: '123456',
  additional_data: {
    bill_number: '--',
    mobile_number: '--',
    store_label: "OOO \"rubyQRpay\"",
    loyalty_number: '***',
    reference_label: '***',
    customer_label: '--',
    terminal_label: '--',
    purpose_of_transaction: '***',
    consumer_data_request: 'AME'
  },
  merchant_information_language: {
    language_reference: 'ru',
    name_alternate: 'Иван Иванов',
    city_alternate: 'Минск'
  }
}

url = 'https://pay.raschet.by#'

payload = Rubyqrpay::Generator.generate_payload(transaction_information)
base64 = Rubyqrpay::Generator.generate_png(url, payload)

License

The gem is available as open source under the terms of the MIT License.