mercadopago-sdk 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7da46ec682afa2328d3fac50f789c51481c558ff0e9d063add5f427c93454bb
4
- data.tar.gz: e00d97b529feb2094dac5e9de5da4f2ce23e4e2f941ce4864518dbfcd62a6008
3
+ metadata.gz: 75c4c95289be299bf94adefca93494cb5303885b15ef0e3ccf6dc60d560f01c8
4
+ data.tar.gz: 9b6191db58ef7307b8c9c39547012335881aabf729e450a2e6038f2640f54be8
5
5
  SHA512:
6
- metadata.gz: 729d0e2425b90155cfa102ce7f587ebc67eb0bbfea318eae5e19f8ffaf33aeeb7be68684883b5e2e0d9fcb7c0d1d44d31b5b1eb23f0508db96f85cc5a8c447a7
7
- data.tar.gz: 01a93754e2303b0971d326d26ef67a3eff8ea5b85eefd534d47903b7ddedf9d5376cb729724cb00b2f2b78b698c67edc7938e678e1e90d9f75e533c77e4c0bec
6
+ metadata.gz: 8c54401e025e3d53601b263dd9dfe33329cc550f6952ec93bfa588f9c703096f3854ae44d3bbfe2a9f456f3507012304ca921e53e62ddb78caf23ad662288a47
7
+ data.tar.gz: 8ca641e3cc48a6d9b2cbc100959eb62a4952782e191b5d31d854c0b7fc267d33dcd47d5d916f625d35fd043e8668da2b9def46930ff1a46d611f6b0931258b64
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mercadopago-sdk (0.3.3)
4
+ mercadopago-sdk (0.3.5)
5
5
  json
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -73,7 +73,7 @@ puts preferenceUpdate
73
73
  #### Search for payments
74
74
 
75
75
  ```ruby
76
- filters = Array["id"=>null, "site_id"=>null, "external_reference"=>null]
76
+ filters = Array["id"=>null, "external_reference"=>null]
77
77
 
78
78
  searchResult = $mp.search_payment(filters)
79
79
 
@@ -8,7 +8,7 @@ class IPN
8
8
  mp = MercadoPago.new('CLIENT_ID', 'CLIENT_SECRET')
9
9
 
10
10
  # Sets the filters you want
11
- filters = Hash["range"=>"date_created", "begin_date"=>"2011-10-21T00:00:00Z", "end_date"=>"2011-10-25T24:00:00Z", "payment_type"=>"credit_card", "operation_type"=>"regular_payment"]
11
+ filters = Hash["range"=>"date_created", "begin_date"=>"2011-10-21T00:00:00Z", "end_date"=>"2011-10-25T24:00:00Z", "payment_type_id"=>"credit_card", "operation_type"=>"regular_payment"]
12
12
 
13
13
  # Search payment data according to filters
14
14
  searchResult = mp.search_payment(filters)
@@ -8,7 +8,7 @@ class IPN
8
8
  mp = MercadoPago.new('CLIENT_ID', 'CLIENT_SECRET')
9
9
 
10
10
  # Sets the filters you want
11
- filters = Hash["installments" => 12, "reason"=>"product_name", "operation_type"=>"regular_payment"]
11
+ filters = Hash["installments" => 12, "description"=>"product_name", "operation_type"=>"regular_payment"]
12
12
 
13
13
  # Search payment data according to filters
14
14
  searchResult = mp.search_payment(filters)
@@ -8,7 +8,7 @@ class IPN
8
8
  mp = MercadoPago.new('CLIENT_ID', 'CLIENT_SECRET')
9
9
 
10
10
  # Sets the filters you want
11
- filters = Hash["payer_email" => "mail02@mail02.com%20mail01@mail01.com", "begin_date"=>"2011-01-01T00:00:00Z", "end_date"=>"2011-02-01T00:00:00Z"]
11
+ filters = Hash["payer.email" => "mail02@mail02.com", "begin_date"=>"2011-01-01T00:00:00Z", "end_date"=>"2011-02-01T00:00:00Z"]
12
12
 
13
13
  # Search payment data according to filters
14
14
  searchResult = mp.search_payment(filters)
@@ -8,7 +8,7 @@ class IPN
8
8
  mp = MercadoPago.new('CLIENT_ID', 'CLIENT_SECRET')
9
9
 
10
10
  # Sets the filters you want
11
- filters = Hash["site_id" => "MLA", "external_reference"=>"Bill001"]
11
+ filters = Hash["external_reference"=>"Bill001"]
12
12
 
13
13
  # Search payment data according to filters
14
14
  searchResult = mp.search_payment(filters)
@@ -69,7 +69,7 @@ class MercadoPago
69
69
  end
70
70
 
71
71
  uri_prefix = @sandbox ? "/sandbox" : ""
72
- @rest_client.get(uri_prefix + "/v1/payments/" + id + "?access_token=" + access_token)
72
+ @rest_client.get("/v1/payments/" + id + "?access_token=" + access_token)
73
73
  end
74
74
 
75
75
  def get_payment_info(id)
@@ -95,8 +95,8 @@ class MercadoPago
95
95
  return e.message
96
96
  end
97
97
 
98
- refund_status = {"status" => "refunded"}
99
- @rest_client.put("/v1/payments/" + id + "?access_token=" + access_token, refund_status)
98
+ refund_status = {}
99
+ @rest_client.post("/v1/payments/" + id + "/refunds?access_token=" + access_token, refund_status)
100
100
  end
101
101
 
102
102
  # Cancel pending payment
@@ -137,7 +137,7 @@ class MercadoPago
137
137
  filters = build_query(filters)
138
138
 
139
139
  uri_prefix = @sandbox ? "/sandbox" : ""
140
- @rest_client.get(uri_prefix + "/v1/payments/search?" + filters + "&access_token=" + access_token)
140
+ @rest_client.get("/v1/payments/search?" + filters + "&access_token=" + access_token)
141
141
  end
142
142
 
143
143
  # Create a checkout preference
@@ -299,7 +299,9 @@ class MercadoPago
299
299
  if API_BASE_URL.scheme == "https" # enable SSL/TLS
300
300
  @http.use_ssl = true
301
301
  @http.verify_mode = OpenSSL::SSL::VERIFY_PEER
302
- @http.ssl_options = OpenSSL::SSL::OP_NO_SSLv3 # explicitly tell OpenSSL not to use SSL3
302
+
303
+ # explicitly tell OpenSSL not to use SSL3 nor TLS 1.0
304
+ @http.ssl_options = OpenSSL::SSL::OP_NO_SSLv3 + OpenSSL::SSL::OP_NO_TLSv1
303
305
  end
304
306
 
305
307
  @http.set_debug_output debug_logger if debug_logger
@@ -339,7 +341,7 @@ class MercadoPago
339
341
  def put(uri, data = nil, content_type=MIME_JSON)
340
342
  exec("PUT", uri, data, content_type)
341
343
  end
342
-
344
+
343
345
  def delete(uri, content_type=MIME_JSON)
344
346
  exec("DELETE", uri, nil, content_type)
345
347
  end
@@ -1 +1 @@
1
- MERCADO_PAGO_VERSION = '0.3.5' unless defined?(MERCADO_PAGO_VERSION)
1
+ MERCADO_PAGO_VERSION = '0.3.6' unless defined?(MERCADO_PAGO_VERSION)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mercadopago-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - maticompiano
@@ -60,7 +60,6 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - ".gitignore"
63
- - ".travis.yml"
64
63
  - Gemfile
65
64
  - Gemfile.lock
66
65
  - README.md
@@ -80,7 +79,6 @@ files:
80
79
  - mercadopago-sdk-0.3.3.gem
81
80
  - mercadopago.gemspec
82
81
  - tests/tests.rb
83
- - travis_Gemfile
84
82
  homepage: http://github.com/mercadopago/sdk-ruby
85
83
  licenses: []
86
84
  metadata: {}
@@ -1,14 +0,0 @@
1
- sudo: required
2
- language: ruby
3
- rvm:
4
- - 1.9.3
5
- - 2.0.0
6
- - 2.1
7
- - 2.2
8
- - 2.3.0
9
- - jruby-19mode
10
- - jruby-9.0.5.0
11
- gemfile:
12
- travis_Gemfile
13
- script:
14
- bundle exec rake test ./tests/tests.rb
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'rake'
4
- gem 'test-unit'