express-checkout 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile.lock +65 -0
- data/express-checkout.gemspec +2 -2
- data/lib/express.rb +30 -30
- data/lib/express/checkout.rb +1 -1
- data/lib/express/checkout/response.rb +3 -3
- data/lib/express/exception/api_error.rb +1 -1
- data/lib/express/ipn.rb +1 -1
- data/lib/express/nvp/request.rb +3 -3
- data/lib/express/nvp/response.rb +1 -1
- data/lib/express/payment/response.rb +1 -1
- data/lib/express/payment/response/info.rb +1 -1
- data/lib/express/payment/response/item.rb +1 -1
- data/lib/express/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b80f621c9d6d4e305337b42745e163305337499a
|
4
|
+
data.tar.gz: 620b23cb21f7023e585987efdb6bcd2ca9cf085b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8da6eb95a7feb67600ee6c4b57ce93093412b8470f0bf1f97e76a9c2e423cad8c9a737eb79ab41b09d27175f9ca6f4a8b3662c77aebf47939ff919987d985ffa
|
7
|
+
data.tar.gz: a7d4fa0b385ffe380240970514e4751ce4a861a96ca153858da13fc384aac8877c4be088b1207b8f2ab87a574f7bf4b74c76c4211fcb56d4daf8d1531795fb1f
|
data/.gitignore
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
express-checkout (0.0.2)
|
5
|
+
activesupport (>= 2.3)
|
6
|
+
attr_required (>= 0.0.5)
|
7
|
+
rest-client
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
activesupport (4.2.3)
|
13
|
+
i18n (~> 0.7)
|
14
|
+
json (~> 1.7, >= 1.7.7)
|
15
|
+
minitest (~> 5.1)
|
16
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
17
|
+
tzinfo (~> 1.1)
|
18
|
+
attr_required (1.0.0)
|
19
|
+
diff-lcs (1.2.5)
|
20
|
+
docile (1.1.5)
|
21
|
+
domain_name (0.5.24)
|
22
|
+
unf (>= 0.0.5, < 1.0.0)
|
23
|
+
fakeweb (1.3.0)
|
24
|
+
http-cookie (1.0.2)
|
25
|
+
domain_name (~> 0.5)
|
26
|
+
i18n (0.7.0)
|
27
|
+
json (1.8.3)
|
28
|
+
mime-types (2.6.1)
|
29
|
+
minitest (5.7.0)
|
30
|
+
netrc (0.10.3)
|
31
|
+
rake (10.4.2)
|
32
|
+
rest-client (1.8.0)
|
33
|
+
http-cookie (>= 1.0.2, < 2.0)
|
34
|
+
mime-types (>= 1.16, < 3.0)
|
35
|
+
netrc (~> 0.7)
|
36
|
+
rspec (2.14.1)
|
37
|
+
rspec-core (~> 2.14.0)
|
38
|
+
rspec-expectations (~> 2.14.0)
|
39
|
+
rspec-mocks (~> 2.14.0)
|
40
|
+
rspec-core (2.14.8)
|
41
|
+
rspec-expectations (2.14.5)
|
42
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
43
|
+
rspec-mocks (2.14.6)
|
44
|
+
simplecov (0.10.0)
|
45
|
+
docile (~> 1.1.0)
|
46
|
+
json (~> 1.8)
|
47
|
+
simplecov-html (~> 0.10.0)
|
48
|
+
simplecov-html (0.10.0)
|
49
|
+
thread_safe (0.3.5)
|
50
|
+
tzinfo (1.2.2)
|
51
|
+
thread_safe (~> 0.1)
|
52
|
+
unf (0.1.4)
|
53
|
+
unf_ext
|
54
|
+
unf_ext (0.0.7.1)
|
55
|
+
|
56
|
+
PLATFORMS
|
57
|
+
ruby
|
58
|
+
|
59
|
+
DEPENDENCIES
|
60
|
+
bundler (~> 1.9)
|
61
|
+
express-checkout!
|
62
|
+
fakeweb (>= 1.3.0)
|
63
|
+
rake (>= 0.8)
|
64
|
+
rspec (< 2.99)
|
65
|
+
simplecov
|
data/express-checkout.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Wei-Yi Chiu"]
|
10
10
|
spec.email = ["bird1204@gmail.com"]
|
11
11
|
|
12
|
-
spec.summary = %q{
|
13
|
-
spec.description = %q{
|
12
|
+
spec.summary = %q{paypal express-checkout gem}
|
13
|
+
spec.description = %q{paypal express-checkout gem}
|
14
14
|
spec.homepage = "https://github.com/bird1204"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
data/lib/express.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require 'express/
|
1
|
+
require 'express/version'
|
2
2
|
require 'logger'
|
3
3
|
require 'active_support'
|
4
4
|
require 'active_support/core_ext'
|
@@ -8,7 +8,7 @@ require 'rest_client'
|
|
8
8
|
|
9
9
|
module Express
|
10
10
|
mattr_accessor :api_version
|
11
|
-
self.api_version = '
|
11
|
+
self.api_version = '124.0'
|
12
12
|
|
13
13
|
ENDPOINT = {
|
14
14
|
production: 'https://www.paypal.com/cgi-bin/webscr',
|
@@ -21,16 +21,16 @@ module Express
|
|
21
21
|
|
22
22
|
def self.endpoint
|
23
23
|
if sandbox?
|
24
|
-
|
24
|
+
Express::ENDPOINT[:sandbox]
|
25
25
|
else
|
26
|
-
|
26
|
+
Express::ENDPOINT[:production]
|
27
27
|
end
|
28
28
|
end
|
29
29
|
def self.popup_endpoint
|
30
30
|
if sandbox?
|
31
|
-
|
31
|
+
Express::POPUP_ENDPOINT[:sandbox]
|
32
32
|
else
|
33
|
-
|
33
|
+
Express::POPUP_ENDPOINT[:production]
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
@@ -59,27 +59,27 @@ module Express
|
|
59
59
|
self.sandbox = false
|
60
60
|
end
|
61
61
|
|
62
|
-
require '
|
63
|
-
require '
|
64
|
-
require '
|
65
|
-
require '
|
66
|
-
require '
|
67
|
-
require '
|
68
|
-
require '
|
69
|
-
require '
|
70
|
-
require '
|
71
|
-
require '
|
72
|
-
require '
|
73
|
-
require '
|
74
|
-
require '
|
75
|
-
require '
|
76
|
-
require '
|
77
|
-
require '
|
78
|
-
require '
|
79
|
-
require '
|
80
|
-
require '
|
81
|
-
require '
|
82
|
-
require '
|
83
|
-
require '
|
84
|
-
require '
|
85
|
-
require '
|
62
|
+
require 'express/util'
|
63
|
+
require 'express/exception'
|
64
|
+
require 'express/exception/http_error'
|
65
|
+
require 'express/exception/api_error'
|
66
|
+
require 'express/base'
|
67
|
+
require 'express/ipn'
|
68
|
+
require 'express/nvp/request'
|
69
|
+
require 'express/nvp/response'
|
70
|
+
require 'express/payment/common/amount'
|
71
|
+
require 'express/checkout/request'
|
72
|
+
require 'express/checkout/response'
|
73
|
+
require 'express/payment/request'
|
74
|
+
require 'express/payment/request/item'
|
75
|
+
require 'express/payment/response'
|
76
|
+
require 'express/payment/response/info'
|
77
|
+
require 'express/payment/response/item'
|
78
|
+
require 'express/payment/response/payer'
|
79
|
+
require 'express/payment/response/reference'
|
80
|
+
require 'express/payment/response/refund'
|
81
|
+
require 'express/payment/response/address'
|
82
|
+
require 'express/payment/recurring'
|
83
|
+
require 'express/payment/recurring/activation'
|
84
|
+
require 'express/payment/recurring/billing'
|
85
|
+
require 'express/payment/recurring/summary'
|
data/lib/express/checkout.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
require '
|
1
|
+
require 'express'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Express
|
2
|
-
module
|
2
|
+
module Checkout
|
3
3
|
class Response < NVP::Response
|
4
4
|
attr_accessor :pay_on_paypal, :mobile
|
5
5
|
|
@@ -10,13 +10,13 @@ module Express
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def redirect_uri
|
13
|
-
endpoint = URI.parse
|
13
|
+
endpoint = URI.parse Express.endpoint
|
14
14
|
endpoint.query = query(:with_cmd).to_query
|
15
15
|
endpoint.to_s
|
16
16
|
end
|
17
17
|
|
18
18
|
def popup_uri
|
19
|
-
endpoint = URI.parse
|
19
|
+
endpoint = URI.parse Express.popup_endpoint
|
20
20
|
endpoint.query = query.to_query
|
21
21
|
endpoint.to_s
|
22
22
|
end
|
data/lib/express/ipn.rb
CHANGED
data/lib/express/nvp/request.rb
CHANGED
@@ -11,7 +11,7 @@ module Express
|
|
11
11
|
}
|
12
12
|
|
13
13
|
def self.endpoint
|
14
|
-
if
|
14
|
+
if Express.sandbox?
|
15
15
|
ENDPOINT[:sandbox]
|
16
16
|
else
|
17
17
|
ENDPOINT[:production]
|
@@ -19,7 +19,7 @@ module Express
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def initialize(attributes = {})
|
22
|
-
@version =
|
22
|
+
@version = Express.api_version
|
23
23
|
super
|
24
24
|
end
|
25
25
|
|
@@ -54,7 +54,7 @@ module Express
|
|
54
54
|
when 'Success', 'SuccessWithWarning'
|
55
55
|
response
|
56
56
|
else
|
57
|
-
raise Exception::APIError.new(response)
|
57
|
+
raise Exception::APIError.new(response).message
|
58
58
|
end
|
59
59
|
rescue RestClient::Exception => e
|
60
60
|
raise Exception::HttpError.new(e.http_code, e.message, e.http_body)
|
data/lib/express/nvp/response.rb
CHANGED
data/lib/express/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: express-checkout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wei-Yi Chiu
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
- - '>='
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 1.3.0
|
125
|
-
description:
|
125
|
+
description: paypal express-checkout gem
|
126
126
|
email:
|
127
127
|
- bird1204@gmail.com
|
128
128
|
executables: []
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- .gitignore
|
133
133
|
- CODE_OF_CONDUCT.md
|
134
134
|
- Gemfile
|
135
|
+
- Gemfile.lock
|
135
136
|
- LICENSE
|
136
137
|
- LICENSE.txt
|
137
138
|
- README.md
|
@@ -189,6 +190,6 @@ rubyforge_project:
|
|
189
190
|
rubygems_version: 2.4.6
|
190
191
|
signing_key:
|
191
192
|
specification_version: 4
|
192
|
-
summary:
|
193
|
+
summary: paypal express-checkout gem
|
193
194
|
test_files: []
|
194
195
|
has_rdoc:
|