rbktoblzcheck is a small Ruby extension for Linux (written in C) that provides an interface for libktoblzcheck, a library to check German account numbers and bank codes. See rbktoblzcheck.sourceforge.net for details.
See file README for the interface documentation.
See file INSTALL for install instructions.
Download: rbktoblzcheck-0.1.tar.gz
Files:
- INSTALL
- README
- LICENSE
- ktoblzcheck.c
- rbkbc
- extconf.rb
- test-ktoblzcheck.rb
- test-ktoblzcheck-all.rb
- test-bankdata.txt
Example:
-----------------------------------------------------------------------
require 'ktoblzcheck'
$bc="20030700"
$an="0"
puts "Testing Bank Code: #{$bc} / Account No. #{$an}"
KtoBlzCheck.new do |kbc|
name,location=kbc.find($bc)
if name
puts "Bank found! #{name} located in #{location}"
else
puts "Bank not found!"
end
case kbc.check($bc,$an)
when KtoBlzCheck::ERROR
puts "Failed, bank code and account number don't match"
when KtoBlzCheck::OK
puts "Success, valid combination of bank code and account number"
when KtoBlzCheck::UNKNOWN
puts "Unknown."
when KtoBlzCheck::BANK_NOT_KNOWN
puts "Unknown bank code"
else
puts "Never reached
"
end
end
-----------------------------------------------------------------------
For more code examples refer to the rbkbc program and the test-*.rb files
provided with this distribution.
0 Antworten bis jetzt ↓
Es gibt keine Kommentare bis jetzt...Trete Sachen weg, die vom Formular runterfallen.
Hinterlasse ein Kommentar