Ruby gem para consumir los métodos de IPN 1 y IPN 2 de Dinero Mail
gem install dinero_mail_ipn
gem 'dinero_mail_ipn'
require 'dinero_mail_ipn'
Consulta de pagos en períodos de una semana.
client = DineroMailIpn::Client.new(:email => '[email protected]', :account => '17128254', :pin => 'AYCN7IXDTM')
response = client.consulta_pago(Date.today - 7, Date.today)
# #<DineroMailIpn::ConsultaPagoResponse:0x5f9600 @hash={"Report"=>{"Email"=>"[email protected]",
# "Acount"=>"17128254", "Pin"=>nil, "StartDate"=>"20110603", "EndDate"=>"20110703", "XML"=>"1",
# "State"=>"1", "Pays"=>nil, "Collections"=>nil, "Tickets"=>nil, "Receptions"=>nil, "Retreats"=>nil,
# "Credits"=>nil, "Debits"=>nil}}>
response.ok?
# true
response.state_description
# "La consulta se realizó correctamente"
payment = response.payments.first
payment["Trx_Payment"]
# "108.98"
Consulta de reportes para transacciones específicas.
c = DineroMailIpn::Client.new(:account => '09813581', :password => 'mipassword')
reporter = c.consulta_transacciones(["31548", "23123"])
report = reporter.reports.first
report.id
# 1
report.amount
# 2999
report.valid?
# true
Ver: http://rubydoc.info/gems/dinero_mail_ipn
Si falta algo, por favor reportarlo como issue.
- Agregar más tests que testeen las posibles respuestas de Dinero Mail IPN
- Agregar más documentación y ejemplos
Lo de siempre.
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 I can ignore when I pull)
Send me a pull request. Bonus points for topic branches.
Dinero Mail IPN is released under the MIT license.