A Ruby Object Mapper for Wirecard XML interface
wirecardmapper is tested against Ruby 1.9.2 .
$ gem install wirecardmapper
or add the following line to Gemfile:
and run bundle install from your shell.
WirecardMapper::Config.server_uri = "https://c3-test.wirecard.com/issuer/client" WirecardMapper::Config.server_port = 443 WirecardMapper::Config.login = "login" WirecardMapper::Config.password = "password" WirecardMapper::Config.mode = "live" WirecardMapper::Config.entity_id = "entity_id" WirecardMapper::Config.product_id = 11
How to use
WirecardMapper.create_card WirecardMapper.card_info(:card_id => '47ae07020a010018157db66065da6e5c') WirecardMapper.update_card_info(:card_id => '47ae07020a010018157db66065da6e5c') WirecardMapper.submit_payment(:card_id => '47ae07020a010018157db66065da6e5c', :amount => 10, :payment_comment => "Test Comment") WirecardMapper.submit_payment(:card_id => '47ae07020a010018157db66065da6e5c', :amount => -10, :payment_comment => "Test Comment") WirecardMapper.payment_info(:card_id => '47ae07020a010018157db66065da6e5c', :from => Time.now - (24 * 3600), :to => Time.now) WirecardMapper.change_card_status(:card_id => '47ae07020a010018157db66065da6e5c', :status_code => 'cancelled')
Note on Patches/Pull Requests
Fork the project.
Make your feature addition or bug fix.
Add tests for it. This is important so I don't break it in a future version unintentionally.
Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself in another branch so I can ignore when I pull)
Send me a pull request. Bonus points for topic branches.
Copyright © 2010 Alexander Klaiber
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.