Implements the client for creating payments in the Wircard Elastic Engine gateway. More info here.
config = WirecardSepa::Config.new({
api_url: 'https://api-test.wirecard.com/engine/rest/paymentmethods/',
http_auth_username: '70000-APITEST-AP',
http_auth_password: 'xxxxxxxxx',
merchant_account_id: '4c901196-eff7-411e-82a3-5ef6b6860d64',
creditor_id: 'DE98ZZZ09999999999'
})
gateway = WirecardSepa::Gateway.new(config)
response = gateway.debit({
requested_amount: '12.12',
account_holder_first_name: 'John',
account_holder_last_name: 'Doe',
bank_account_iban: 'DE42512308000000060004',
bank_account_bic: 'WIREDEMMXXX',
mandate_id: '1235678',
mandate_signed_date: '2015-06-02'
})
response.success?
=> true
Beginning with version 0.0.5 the WirecardSepa::Gateway#debit method
accepts a custom_fields
param which forwards custom key-value pairs
to the wirecard payment back end.
Usage example:
response = gateway.debit({
requested_amount: '12.12',
account_holder_first_name: 'John',
account_holder_last_name: 'Doe',
bank_account_iban: 'DE42512308000000060004',
bank_account_bic: 'WIREDEMMXXX',
mandate_id: '1235678',
mandate_signed_date: '2015-06-02',
custom_fields: {
'Banana' => 'tree',
'Department' => 'IT',
}
})
- Simple error handling
- Docs for usage in README.md
- Fork it ( https://github.com/betterplace/wirecard_sepa/fork )
- 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 a new Pull Request