creative-paypal-express 0.8.2.4 → 1.0.0
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/.rspec +1 -0
- data/{README.rdoc → README.md} +9 -7
- data/VERSION +1 -1
- data/creative-paypal-express.gemspec +7 -2
- data/lib/paypal.rb +1 -0
- data/lib/paypal/express/response.rb +10 -1
- data/spec/paypal/express/response_spec.rb +6 -5
- data/spec/spec_helper.rb +2 -1
- metadata +22 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd9a7241d4599a27e75b5e959b1dca04a8eda50a
|
4
|
+
data.tar.gz: a78be97e091d72e61b8730f8dbe1e2073ed9ff8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 872300d61d43649e2b8f61c48cad25cdee1cd35eff4ad6e7dfd2b4d4a0f4bbae3e9cc50d7d84857b5be403228dcf1ba53799a12eb4b29addf1c7448a93b2ab29
|
7
|
+
data.tar.gz: 8c40b48a0a345cee2478fb83d768383ed50afbe1ace45bda105b1493c8dd9e9f9d33cff01b3aad40616312f6d1b639dda183c7c052fba56e58bc3697d7a9912a
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
data/{README.rdoc → README.md}
RENAMED
@@ -1,16 +1,18 @@
|
|
1
|
-
|
1
|
+
# paypal-express
|
2
2
|
|
3
3
|
Handle PayPal Express Checkout.
|
4
4
|
Both Instance Payment and Recurring Payment are supported.
|
5
5
|
Express Checkout for Digital Goods is also supported.
|
6
6
|
|
7
|
-
|
7
|
+
## Installation
|
8
8
|
|
9
|
-
|
9
|
+
```rb
|
10
|
+
gem "creative-paypal-express", "~> 1.0.0"
|
11
|
+
```
|
10
12
|
|
11
13
|
gem install paypal-express
|
12
14
|
|
13
|
-
|
15
|
+
## Usage
|
14
16
|
|
15
17
|
See Wiki on Github
|
16
18
|
https://github.com/nov/paypal-express/wiki
|
@@ -19,7 +21,7 @@ Play with Sample Rails App
|
|
19
21
|
https://github.com/nov/paypal-express-sample
|
20
22
|
https://paypal-express-sample.heroku.com
|
21
23
|
|
22
|
-
|
24
|
+
## Note on Patches/Pull Requests
|
23
25
|
|
24
26
|
* Fork the project.
|
25
27
|
* Make your feature addition or bug fix.
|
@@ -29,6 +31,6 @@ https://paypal-express-sample.heroku.com
|
|
29
31
|
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
30
32
|
* Send me a pull request. Bonus points for topic branches.
|
31
33
|
|
32
|
-
|
34
|
+
## Copyright
|
33
35
|
|
34
|
-
Copyright (c) 2011 nov matake. See LICENSE for details.
|
36
|
+
Copyright (c) 2011 nov matake. See LICENSE for details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
1.0.0
|
@@ -1,4 +1,5 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
|
+
s.required_ruby_version = '>= 2.1.2'
|
2
3
|
s.name = "creative-paypal-express"
|
3
4
|
s.version = File.read(File.join(File.dirname(__FILE__), "VERSION"))
|
4
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.3.6") if s.respond_to? :required_rubygems_version=
|
@@ -6,18 +7,22 @@ Gem::Specification.new do |s|
|
|
6
7
|
s.description = %q{PayPal Express Checkout API Client for Instance, Recurring and Digital Goods Payment.}
|
7
8
|
s.summary = %q{PayPal Express Checkout API Client for Instance, Recurring and Digital Goods Payment.}
|
8
9
|
s.email = "hi@creative.gs"
|
9
|
-
s.extra_rdoc_files = ["LICENSE", "README.
|
10
|
+
s.extra_rdoc_files = ["LICENSE", "README.md"]
|
10
11
|
s.rdoc_options = ["--charset=UTF-8"]
|
11
12
|
s.homepage = "http://github.com/CreativeGS/paypal-express"
|
12
13
|
s.require_paths = ["lib"]
|
13
14
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
14
15
|
s.files = `git ls-files`.split("\n")
|
15
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
-
|
17
|
+
|
18
|
+
s.add_dependency "activesupport", ">= 4"
|
17
19
|
s.add_dependency "rest-client"
|
18
20
|
s.add_dependency "attr_required", ">= 0.0.5"
|
21
|
+
|
22
|
+
# s.add_development_dependency "activesupport", "4.1" # uses this for development, but will probably work with higher versions
|
19
23
|
s.add_development_dependency "rake", ">= 0.8"
|
20
24
|
s.add_development_dependency "simplecov"
|
21
25
|
s.add_development_dependency "rspec", "< 2.99"
|
22
26
|
s.add_development_dependency "fakeweb", ">= 1.3.0"
|
27
|
+
s.add_development_dependency "pry"
|
23
28
|
end
|
data/lib/paypal.rb
CHANGED
@@ -3,6 +3,15 @@ module Paypal
|
|
3
3
|
class Response < NVP::Response
|
4
4
|
attr_accessor :pay_on_paypal, :mobile
|
5
5
|
|
6
|
+
# Paypal::Express::Response.new()
|
7
|
+
# response = {
|
8
|
+
# :ACK=>"Success",
|
9
|
+
# :BUILD=>"1721431",
|
10
|
+
# :CORRELATIONID=>"5549ea3a78af1",
|
11
|
+
# :TIMESTAMP=>"2011-02-02T02:02:18Z",
|
12
|
+
# :TOKEN=>"EC-5YJ90598G69065317",
|
13
|
+
# :VERSION=>"66.0"
|
14
|
+
# }
|
6
15
|
def initialize(response, options = {})
|
7
16
|
super response
|
8
17
|
@pay_on_paypal = options[:pay_on_paypal]
|
@@ -32,4 +41,4 @@ module Paypal
|
|
32
41
|
end
|
33
42
|
end
|
34
43
|
end
|
35
|
-
end
|
44
|
+
end
|
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# rspec spec/paypal/express/response_spec.rb
|
3
2
|
describe Paypal::Express::Response do
|
4
3
|
before { fake_response 'SetExpressCheckout/success' }
|
5
4
|
|
@@ -13,7 +12,7 @@ describe Paypal::Express::Response do
|
|
13
12
|
)
|
14
13
|
end
|
15
14
|
let :payment_request do
|
16
|
-
Paypal::Payment::Request.new(
|
15
|
+
Paypal::Payment::Request.new(
|
17
16
|
:billing_type => :RecurringPayments,
|
18
17
|
:billing_agreement_description => 'Recurring Payment Request'
|
19
18
|
)
|
@@ -22,7 +21,9 @@ describe Paypal::Express::Response do
|
|
22
21
|
|
23
22
|
describe '#redirect_uri' do
|
24
23
|
subject { response.redirect_uri }
|
25
|
-
it
|
24
|
+
it do
|
25
|
+
should include 'https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token='
|
26
|
+
end
|
26
27
|
end
|
27
28
|
|
28
29
|
describe '#popup_uri' do
|
@@ -77,4 +78,4 @@ describe Paypal::Express::Response do
|
|
77
78
|
end
|
78
79
|
end
|
79
80
|
|
80
|
-
end
|
81
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: creative-paypal-express
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nov matake
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-11-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
20
|
+
version: '4'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
27
|
+
version: '4'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rest-client
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,6 +109,20 @@ dependencies:
|
|
109
109
|
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: 1.3.0
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: pry
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
112
126
|
description: PayPal Express Checkout API Client for Instance, Recurring and Digital
|
113
127
|
Goods Payment.
|
114
128
|
email: hi@creative.gs
|
@@ -116,7 +130,7 @@ executables: []
|
|
116
130
|
extensions: []
|
117
131
|
extra_rdoc_files:
|
118
132
|
- LICENSE
|
119
|
-
- README.
|
133
|
+
- README.md
|
120
134
|
files:
|
121
135
|
- ".document"
|
122
136
|
- ".gitignore"
|
@@ -124,10 +138,9 @@ files:
|
|
124
138
|
- ".travis.yml"
|
125
139
|
- Gemfile
|
126
140
|
- LICENSE
|
127
|
-
- README.
|
141
|
+
- README.md
|
128
142
|
- Rakefile
|
129
143
|
- VERSION
|
130
|
-
- creative-paypal-express-0.8.2.gem
|
131
144
|
- creative-paypal-express.gemspec
|
132
145
|
- lib/paypal.rb
|
133
146
|
- lib/paypal/base.rb
|
@@ -215,7 +228,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
215
228
|
requirements:
|
216
229
|
- - ">="
|
217
230
|
- !ruby/object:Gem::Version
|
218
|
-
version:
|
231
|
+
version: 2.1.2
|
219
232
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
233
|
requirements:
|
221
234
|
- - ">="
|
@@ -223,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
223
236
|
version: 1.3.6
|
224
237
|
requirements: []
|
225
238
|
rubyforge_project:
|
226
|
-
rubygems_version: 2.
|
239
|
+
rubygems_version: 2.2.2
|
227
240
|
signing_key:
|
228
241
|
specification_version: 4
|
229
242
|
summary: PayPal Express Checkout API Client for Instance, Recurring and Digital Goods
|