paddle_pay 0.2.0 → 0.3.0
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/README.md +10 -0
- data/lib/paddle_pay/configuration.rb +3 -0
- data/lib/paddle_pay/connection.rb +11 -1
- data/lib/paddle_pay/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2851706b1aa5000cc4eb332165a5587824ac66196e91daa7ce5b46ab2edd431
|
4
|
+
data.tar.gz: 646130416e4f747589df3e6d5d3abe550947396b6df71393d0b05c76adc1f897
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acdd0b25613b63faab14304ca2587d0b8cc049b285d6ed7dfd1facb10eddba1d68f284ff94c28d11e81e67e9328d88014365f7d5443035cb5779ddbe94a9b9ba
|
7
|
+
data.tar.gz: 460eff4f950b8206bf9d96bd5d32737296cc8e33265e92e0be3ee76c57f534a5746a2b3292a721e161ddb25287e4e904494597e3eb7089f8fb476e8e5e2fd823
|
data/README.md
CHANGED
@@ -213,6 +213,16 @@ id = '123456'
|
|
213
213
|
PaddlePay::Transaction::User.list(id, options = {})
|
214
214
|
```
|
215
215
|
|
216
|
+
## Proxy
|
217
|
+
|
218
|
+
```ruby
|
219
|
+
PaddlePay.configure do |config|
|
220
|
+
config.proxy_host = 'YOUR PROXY HOST'
|
221
|
+
config.proxy_port = 'YOUR PROXY PORT'
|
222
|
+
config.ssl_verify = true
|
223
|
+
end
|
224
|
+
```
|
225
|
+
|
216
226
|
## Webhooks
|
217
227
|
|
218
228
|
With this gem it is possible to communicate with the Paddle API, but no webhooks are handled. If you want to handle Paddle webhooks in a Ruby on Rails application, please have a look at the [pay gem](https://github.com/pay-rails/pay) where this gem is integrated.
|
@@ -9,7 +9,9 @@ module PaddlePay
|
|
9
9
|
headers = options.delete(:headers) || {}
|
10
10
|
body = options.delete(:body) || {}
|
11
11
|
|
12
|
-
conn = Faraday.new(url: request_url
|
12
|
+
conn = Faraday.new(url: request_url,
|
13
|
+
proxy: proxy_url,
|
14
|
+
ssl: {verify: PaddlePay.config.ssl_verify}) { |faraday|
|
13
15
|
faraday.request :url_encoded
|
14
16
|
faraday.response :raise_error
|
15
17
|
faraday.response :json
|
@@ -62,6 +64,14 @@ module PaddlePay
|
|
62
64
|
vendor_auth_code: PaddlePay.config.vendor_auth_code
|
63
65
|
}
|
64
66
|
end
|
67
|
+
|
68
|
+
def proxy_url
|
69
|
+
if PaddlePay.config.proxy_host && PaddlePay.config.proxy_port
|
70
|
+
return "#{PaddlePay.config.proxy_host}:#{PaddlePay.config.proxy_port}"
|
71
|
+
end
|
72
|
+
|
73
|
+
nil
|
74
|
+
end
|
65
75
|
end
|
66
76
|
end
|
67
77
|
end
|
data/lib/paddle_pay/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paddle_pay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Metzger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -281,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
281
281
|
- !ruby/object:Gem::Version
|
282
282
|
version: '0'
|
283
283
|
requirements: []
|
284
|
-
rubygems_version: 3.2.
|
284
|
+
rubygems_version: 3.2.33
|
285
285
|
signing_key:
|
286
286
|
specification_version: 4
|
287
287
|
summary: A Ruby wrapper for the paddle.com API
|