SPAYD (Short Payment Descriptor) is a format used by CBA (Česká bankovní asociace) for QR Payment (QR Platba). This gem generates payment info in SPAYD format.
Great for use with ruby QR code gem rqrcode.
Add this line to your application's Gemfile:
gem 'rspayd'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rspayd
>> Rspayd::CzechPayment.generate_string(
:accountNumber=>'810883001',
:bankCode => '5500',
:amount => 430.00,
:vs=>"31030001",
:message => "Platba za domenu"
)
=> SPD*1.0*ACC:CZ9555000000000810883001*AM:430.00*CC:CZK*X-VS:31030001*MSG:PLATBA ZA DOMENU
This gem implements only the basic SPAYD subset needed for simple payment in Czech Republic. Feel free to extend this gem based on your needs and send pull requests.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request