A ruby gem created by Sergio Maziano for the ProxyPay API that allows online payments using Angolan ATM's reference (Multicaixa references).
Add this line to your application's Gemfile:
gem 'proxypay'
And then execute:
$ bundle
Or install it yourself as:
$ gem install proxypay
Make sure you setup the environment variables PROXYPAY_USER and PROXYPAY_API_KEY:
PROXYPAY_USER=api
PROXYPAY_API_KEY=your_api_key_obtained_from_proxypay_folks
to make requests with another api_key use this on every method call.
options = {api_key: your_api_key_obtained_from_proxypay_folks}
to make the request proxypay's test server use
options = {is_test: true}
Proxypay.get_references # Fetch all references
Proxypay.get_references(api_key: some_api_key) # fetch using this key
Proxypay.get_references(is_test: true) # fetch from the test server
or you can pass one or several query's parameters and even use the custom_fields defined at proxypay.
options = {query: {status:"paid", offset:15, limit:13, q:{custom_fields:{your_fild:"some_data", some_other_filed:{that_takes:"an_hash"}}}}}
Proxypay.get_references(options)
options = {}
Proxypay.get_reference(id, options)
Proxypay.new_reference("2000.00", "2015-10-10")
options = {custom_fields: {invoice:"001-2015", description:"Client #{client_number} - monthly payment"}}
Proxypay.new_reference("2000.00", "2015-10-10", options)
Proxypay.get_payments
options = {query: {n:48}}
Proxypay.get_payments(options)
options = {}
Proxypay.get_payment("OcSLBANU4tjRi9gfW5VUcMqkvzL", options)
options = {}
Proxypay.new_payment("OcSLBANU4tjRi9gfW5VUcMqkvzL", options)
ids = ["OcSLBANU4tjRi9gfW5VUcMqkvzL", "EcJLBANU4trUi8gfM6MOcMqkvzH","VxELBANU4tjRi9gfW5VUcMqkvzZ"]
options = {}
Proxypay.new_payments(ids, options)
- You can fork the project
- bundle
- bundle rake exec
- Make your feature addition or fix a bug
- Do not mess with rakefile, version or history (do not submit version bump PLEASE or put it in a different commit so we can ignore it when pull)
- Send us the pull request
Bug reports and pull requests are welcome on GitHub at https://github.com/smaziano/proxypay. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.