mercadopago-sdk 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/examples/payment-search/search-creditcard-payments.rb +1 -1
- data/examples/payment-search/search-funded-payments-by-name.rb +1 -1
- data/examples/payment-search/search-payments-from-email-and-date.rb +1 -1
- data/examples/payment-search/search-payments.rb +1 -1
- data/lib/mercadopago.rb +8 -6
- data/lib/version.rb +1 -1
- metadata +1 -3
- data/.travis.yml +0 -14
- data/travis_Gemfile +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75c4c95289be299bf94adefca93494cb5303885b15ef0e3ccf6dc60d560f01c8
|
4
|
+
data.tar.gz: 9b6191db58ef7307b8c9c39547012335881aabf729e450a2e6038f2640f54be8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c54401e025e3d53601b263dd9dfe33329cc550f6952ec93bfa588f9c703096f3854ae44d3bbfe2a9f456f3507012304ca921e53e62ddb78caf23ad662288a47
|
7
|
+
data.tar.gz: 8ca641e3cc48a6d9b2cbc100959eb62a4952782e191b5d31d854c0b7fc267d33dcd47d5d916f625d35fd043e8668da2b9def46930ff1a46d611f6b0931258b64
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -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", "
|
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, "
|
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["
|
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["
|
11
|
+
filters = Hash["external_reference"=>"Bill001"]
|
12
12
|
|
13
13
|
# Search payment data according to filters
|
14
14
|
searchResult = mp.search_payment(filters)
|
data/lib/mercadopago.rb
CHANGED
@@ -69,7 +69,7 @@ class MercadoPago
|
|
69
69
|
end
|
70
70
|
|
71
71
|
uri_prefix = @sandbox ? "/sandbox" : ""
|
72
|
-
@rest_client.get(
|
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 = {
|
99
|
-
@rest_client.
|
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(
|
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
|
-
|
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
|
data/lib/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
MERCADO_PAGO_VERSION = '0.3.
|
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.
|
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: {}
|
data/.travis.yml
DELETED
data/travis_Gemfile
DELETED