Sha256: f4a834f9e4129c5188c305d2555974fa7e768b9c21c82fabdc169aa1783d88f0
Contents?: true
Size: 530 Bytes
Versions: 9
Compression:
Stored size: 530 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["site_id" => "MLA", "external_reference"=>"Bill001"] # 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
9 entries across 9 versions & 2 rubygems