Sha256: 58492f37fecec326edb322f539b3f03a63393284fbfe94dea842d47948c40eab
Contents?: true
Size: 589 Bytes
Versions: 5
Compression:
Stored size: 589 Bytes
Contents
require 'rubygems' require 'rack' $LOAD_PATH << '../../lib' require 'mercadopago.rb' class IPN def call(env) mp = MercadoPago.new('CLIENT_ID', 'CLIENT_SECRET') # Sets the filters you want filters = Hash["payer.email" => "mail02@mail02.com", "begin_date"=>"2011-01-01T00:00:00Z", "end_date"=>"2011-02-01T00:00:00Z"] # Search payment data according to filters searchResult = mp.search_payment(filters) # Show payment information html = searchResult.inspect return [200, {'Content-Type' => 'text/html'}, [html]] end end Rack::Handler::WEBrick.run(IPN.new, :Port => 9000)
Version data entries
5 entries across 5 versions & 2 rubygems