wepay-rails 2.5.1 → 2.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/api/preapproval_methods.rb +4 -0
- data/test/test_wepay_rails_preapproval_methods.rb +5 -2
- data/wepay-rails.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.5.
|
1
|
+
2.5.2
|
@@ -9,7 +9,7 @@ class TestWepayRailsPreapprovalMethods < ActiveSupport::TestCase
|
|
9
9
|
@checkout_params = {
|
10
10
|
:amount => 300,
|
11
11
|
:period => "once",
|
12
|
-
:short_description => "This is a
|
12
|
+
:short_description => "This is a preapproval test!",
|
13
13
|
:account_id => "12345"
|
14
14
|
}
|
15
15
|
end
|
@@ -19,8 +19,11 @@ class TestWepayRailsPreapprovalMethods < ActiveSupport::TestCase
|
|
19
19
|
end
|
20
20
|
|
21
21
|
test "should create a new WePay preapproval object" do
|
22
|
+
|
23
|
+
security_token = Digest::SHA2.hexdigest("1#{Time.now.to_i}")
|
22
24
|
stub_request(:post, "https://stage.wepayapi.com/v2/preapproval/create").
|
23
|
-
with(:
|
25
|
+
with(:body => "callback_uri=http%3A%2F%2Fwww.example.com%2Fwepay%2Fipn%3Fsecurity_token%3D#{security_token}&redirect_uri=http%3A%2F%2Fwww.example.com%2Fpreapproval%2Fsuccess%3Fsecurity_token%3D#{security_token}&fee_payer=Payee&charge_tax=0&app_fee=0&require_shipping=0&shipping_fee=0&account_id=12345&amount=300&period=once&short_description=This%20is%20a%20preapproval%20test!",
|
26
|
+
:headers => {'Authorization'=>'Bearer: 1c69cebd40ababb0447700377dd7751bb645e874edac140f1ba0c35ad6e98c97', 'User-Agent'=>'WepayRails'}).
|
24
27
|
to_return(:status => 200, :body => sample_preapproval_response, :headers => {})
|
25
28
|
|
26
29
|
@response = wepay_gateway.perform_preapproval(@checkout_params)
|
data/wepay-rails.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wepay-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -214,7 +214,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
214
214
|
version: '0'
|
215
215
|
segments:
|
216
216
|
- 0
|
217
|
-
hash:
|
217
|
+
hash: 2404280652077734602
|
218
218
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
219
219
|
none: false
|
220
220
|
requirements:
|