offsite_payments 2.6.6 → 2.6.7

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
  SHA1:
3
- metadata.gz: d95d9848319381dc986f633e7c42190e402ba680
4
- data.tar.gz: a6a611b91129bf5775ea30234552588e4c16c013
3
+ metadata.gz: 6f64388719134b6c2477e56fb133586e0577273b
4
+ data.tar.gz: aef7c9494eda15a44f60b374f00f2e30f8a86eb3
5
5
  SHA512:
6
- metadata.gz: 7d72aad14eb351f2746ef51831f01663d26c85108f07611ba6900bba629d06fbb865cf9c48f6ddf0345df7ece0582a8abfec8dbd0039afeb8f1e79e429bbbfc5
7
- data.tar.gz: 921ef5f43c384142dff5d6b9f4afbb0cafbd02f7bb89b968c825b016fffdbbdb6f9f1a21cdb5b1ddf9dab97354812b38ec876d236a4acba6deb1670421a98da1
6
+ metadata.gz: 95e09168c57ff3c7bbc7b5e8b87d32afb740b0a887be1785bb0a8aa46ae1e61593626e7ca4257332260194cb820698ee63b9bb13ab61199bd2d56dd9587693e8
7
+ data.tar.gz: d1efd82ca2f60e45e27e64c9b3b72a48f01be8a654da97d12c1eb871328108836a63bffa91ac65b50d436170340253800991274fe14dbd987d9698dd9f179bf5
@@ -2,6 +2,7 @@ module OffsitePayments #:nodoc:
2
2
  module Integrations #:nodoc:
3
3
  module Mollie
4
4
  class API
5
+ include ActiveUtils::NetworkConnectionRetries
5
6
  include ActiveUtils::PostsData
6
7
 
7
8
  attr_reader :token
@@ -13,10 +14,12 @@ module OffsitePayments #:nodoc:
13
14
  end
14
15
 
15
16
  def get_request(resource, params = nil)
16
- uri = URI.parse(MOLLIE_API_V1_URI + resource)
17
- uri.query = params.map { |k,v| "#{CGI.escape(k)}=#{CGI.escape(v)}"}.join('&') if params
18
- headers = { "Authorization" => "Bearer #{token}", "Content-Type" => "application/json" }
19
- JSON.parse(ssl_get(uri.to_s, headers))
17
+ retry_exceptions({retry_safe: true}) do
18
+ uri = URI.parse(MOLLIE_API_V1_URI + resource)
19
+ uri.query = params.map { |k,v| "#{CGI.escape(k)}=#{CGI.escape(v)}"}.join('&') if params
20
+ headers = { "Authorization" => "Bearer #{token}", "Content-Type" => "application/json" }
21
+ JSON.parse(ssl_get(uri.to_s, headers))
22
+ end
20
23
  end
21
24
 
22
25
  def post_request(resource, params = nil)
@@ -1,3 +1,3 @@
1
1
  module OffsitePayments
2
- VERSION = "2.6.6"
2
+ VERSION = "2.6.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: offsite_payments
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.6
4
+ version: 2.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Luetke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-06 00:00:00.000000000 Z
11
+ date: 2018-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport