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 CHANGED
@@ -1 +1 @@
1
- 2.5.1
1
+ 2.5.2
@@ -60,7 +60,11 @@ module WepayRails
60
60
  :account_id => @wepay_config[:account_id]
61
61
  }.merge(params)
62
62
 
63
+ begin
63
64
  resp = self.call_api("/preapproval/create", defaults)
65
+ rescue => e
66
+ puts e.message
67
+ end
64
68
  resp.merge({:security_token => security_token})
65
69
  end
66
70
 
@@ -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 checkout test!",
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(:headers => wepay_gateway.wepay_auth_header).
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "wepay-rails"
8
- s.version = "2.5.1"
8
+ s.version = "2.5.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Adam Medeiros"]
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.1
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: -3118389177307710448
217
+ hash: 2404280652077734602
218
218
  required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  none: false
220
220
  requirements: