payjp 0.0.6 → 0.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ebc7ca3b834edcac9e21591f4276ab0565f2737b
4
- data.tar.gz: a33c549105cf8879e36f2138b2c25c354e470960
3
+ metadata.gz: 27457effbc47ae96c13305248fc780f9e2f1ca00
4
+ data.tar.gz: 4a06532b2b0eaf162e2db5b3795584f92d98d3ef
5
5
  SHA512:
6
- metadata.gz: 3eee26dfe4f02da8e58681cfa911e0366684d2331ef277ce42ef9f1b639026799b1a155897c6612301e106d0ace91757350ff123060e57fb799fb6a4fbf46d43
7
- data.tar.gz: baa39ffbea0e3be47a2dfcc6b671461ecfef2f57f299fa09ac78f126cfd5ee98b4f963ae4562255616c810753a4ece35e7302aeaf33a440259d6b7a1ad31ef10
6
+ metadata.gz: b65d4c3f8df6e10e198dc8a289210adbd06098d8e8220497d2d1f40d5315c6bb775ab7ecb73d94b87b6374bbb6b6116fdeae486ddab71512c95311b64e3556bd
7
+ data.tar.gz: ee4ee024077834fd5d9840a251784dd568ea4e0c33e2893c663d100b91cf8c6f89951e49d604c57641819ba82304ece75bb62619524a10ec6165fc04187a4612
@@ -0,0 +1,59 @@
1
+ # PAY.JP for Ruby
2
+
3
+ ## How to Use
4
+
5
+ ```ruby
6
+ require 'payjp'
7
+ Payjp.api_key = 'sk_test_c62fade9d045b54cd76d7036'
8
+ Payjp.open_timeout = 30 # optionally
9
+ Payjp.read_timeout = 90 # optionally
10
+
11
+ # ex, create charge
12
+ charge = Payjp::Charge.create(
13
+ :amount => 3500,
14
+ :card => 'token_id',
15
+ :currency => 'jpy',
16
+ )
17
+ ```
18
+
19
+ | `Payjp` variables | type | required | description |
20
+ | ----------------- | ---- | -------- | ----------- |
21
+ | api_key | String | yes | your secret key |
22
+ | open_timeout | Integer | no | the second to wait for TCP connection opening (default 30) |
23
+ | read_timeout | Integer | no | the second to wait from request to reading response (default 90) |
24
+
25
+ For detail, See [PAY.JP API Docs](https://pay.jp/docs/api/)
26
+
27
+ ## Installation
28
+
29
+ ```sh
30
+ gem install payjp
31
+ ```
32
+
33
+ If you want to build the gem from source:
34
+
35
+ ```sh
36
+ gem build payjp.gemspec
37
+ ```
38
+
39
+ ### Requirements
40
+
41
+ * Ruby 2.0.0 or above.
42
+ * rest-client
43
+
44
+ ### Bundler
45
+
46
+ If you are installing via bundler, you should be sure to use the https
47
+ rubygems source in your Gemfile, as any gems fetched over http could potentially be
48
+ compromised in transit and alter the code of gems fetched securely over https:
49
+
50
+ ```
51
+ source 'https://rubygems.org'
52
+
53
+ gem 'rails'
54
+ gem 'payjp'
55
+ ```
56
+
57
+ ## Development
58
+
59
+ Test cases can be run with: `bundle exec rake test`
@@ -46,7 +46,7 @@ require 'payjp/errors/authentication_error'
46
46
  module Payjp
47
47
  @api_base = 'https://api.pay.jp'
48
48
  @open_timeout = 30
49
- @read_timeout = 80
49
+ @read_timeout = 90
50
50
  @ssl_ca_file = nil
51
51
  @ssl_ca_path = nil
52
52
  @ssl_cert_store = nil
@@ -266,11 +266,12 @@ module Payjp
266
266
  api_base_url = @api_base unless api_base_url
267
267
  connection_message = "Please check your internet connection and try again. " \
268
268
  "If this problem persists, you should check Payjp's service status at " \
269
- "https://twitter.com/payjpstatus, or let us know at support@pay.jp."
269
+ "https://status.pay.jp or let us know at support@pay.jp."
270
270
 
271
271
  case e
272
272
  when RestClient::RequestTimeout
273
- message = "Could not connect to Payjp (#{api_base_url}). #{connection_message}"
273
+ message = "Timed out over #{@read_timeout} sec. " \
274
+ "Check if your request successed or not."
274
275
 
275
276
  when RestClient::ServerBrokeConnection
276
277
  message = "The connection to the server (#{api_base_url}) broke before the " \
@@ -278,8 +279,7 @@ module Payjp
278
279
 
279
280
  when SocketError
280
281
  message = "Unexpected error communicating when trying to connect to Payjp. " \
281
- "You may be seeing this message because your DNS is not working. " \
282
- "To check, try running 'host pay.jp' from the command line."
282
+ "Your DNS may not work. Check 'host api.pay.jp' from the command line."
283
283
 
284
284
  else
285
285
  message = "Unexpected error communicating with Payjp. " \
@@ -1,3 +1,3 @@
1
1
  module Payjp
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,103 +1,103 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: payjp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - PAY.JP
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-25 00:00:00.000000000 Z
11
+ date: 2019-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mocha
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.2.1
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.2.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activesupport
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - <
45
+ - - "<"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '5.0'
48
- - - ~>
48
+ - - "~>"
49
49
  - !ruby/object:Gem::Version
50
50
  version: 4.2.7
51
51
  type: :development
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
- - - <
55
+ - - "<"
56
56
  - !ruby/object:Gem::Version
57
57
  version: '5.0'
58
- - - ~>
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: 4.2.7
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: test-unit
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ~>
65
+ - - "~>"
66
66
  - !ruby/object:Gem::Version
67
67
  version: 3.2.2
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ~>
72
+ - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: 3.2.2
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rake
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - ~>
79
+ - - "~>"
80
80
  - !ruby/object:Gem::Version
81
81
  version: 11.3.0
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - ~>
86
+ - - "~>"
87
87
  - !ruby/object:Gem::Version
88
88
  version: 11.3.0
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: bundler
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - '>='
93
+ - - ">="
94
94
  - !ruby/object:Gem::Version
95
95
  version: 1.7.6
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - '>='
100
+ - - ">="
101
101
  - !ruby/object:Gem::Version
102
102
  version: 1.7.6
103
103
  description: PAY.JP makes it way easier and less expensive to accept payments.
@@ -107,15 +107,15 @@ executables: []
107
107
  extensions: []
108
108
  extra_rdoc_files: []
109
109
  files:
110
- - .gitignore
111
- - .rubocop.yml
112
- - .rubocop_todo.yml
113
- - .travis.yml
110
+ - ".gitignore"
111
+ - ".rubocop.yml"
112
+ - ".rubocop_todo.yml"
113
+ - ".travis.yml"
114
114
  - CONTRIBUTORS
115
115
  - Gemfile
116
116
  - History.txt
117
117
  - LICENSE
118
- - README.rdoc
118
+ - README.md
119
119
  - Rakefile
120
120
  - lib/payjp.rb
121
121
  - lib/payjp/account.rb
@@ -170,17 +170,17 @@ require_paths:
170
170
  - lib
171
171
  required_ruby_version: !ruby/object:Gem::Requirement
172
172
  requirements:
173
- - - '>='
173
+ - - ">="
174
174
  - !ruby/object:Gem::Version
175
175
  version: '0'
176
176
  required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - '>='
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  requirements: []
182
182
  rubyforge_project:
183
- rubygems_version: 2.0.14.1
183
+ rubygems_version: 2.5.2.3
184
184
  signing_key:
185
185
  specification_version: 4
186
186
  summary: Ruby bindings for the Payjp API
@@ -1,37 +0,0 @@
1
- = PAY.JP for Ruby
2
-
3
- == Documentation
4
-
5
- {PAY.JP API Docs}[https://pay.jp/docs/api/]
6
-
7
- == Installation
8
-
9
- You don't need this source code unless you want to modify the gem. If
10
- you just want to use the Payjp Ruby bindings, you should run:
11
-
12
- gem install payjp
13
-
14
- If you want to build the gem from source:
15
-
16
- gem build payjp.gemspec
17
-
18
- == Requirements
19
-
20
- * Ruby 2.0.0 or above.
21
-
22
- * rest-client
23
-
24
- == Bundler
25
-
26
- If you are installing via bundler, you should be sure to use the https
27
- rubygems source in your Gemfile, as any gems fetched over http could potentially be
28
- compromised in transit and alter the code of gems fetched securely over https:
29
-
30
- source 'https://rubygems.org'
31
-
32
- gem 'rails'
33
- gem 'payjp'
34
-
35
- == Development
36
-
37
- Test cases can be run with: `bundle exec rake test`