stripe 1.47.0 → 1.48.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +4 -0
- data/VERSION +1 -1
- data/lib/stripe.rb +1 -0
- data/lib/stripe/three_d_secure.rb +13 -0
- data/lib/stripe/util.rb +1 -0
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/three_d_secure_test.rb +16 -0
- data/test/test_data.rb +15 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 675dcb4ab0fc09e68dd7926d6ce56decd3e71a4b
|
4
|
+
data.tar.gz: e4571dd914163a88dbfbc4a6402aa2980d277f23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a66e47defb3869d715d1aeec330e1beb7ec0dc84499accd5899cdf874cacf495c6c4b4bbc0f408aa0ebcf49e089e4cbf41cf2955e591ecdedc597522d5dd694e
|
7
|
+
data.tar.gz: 8825267202f9e2281d1badc7f985c2a783b004165c4a164c36bb8e01ddf03b32f2ec3626cd6704d972883605963596d83ffa59f85ec2c818c455b24c01e2b8ec
|
data/History.txt
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.48.0
|
data/lib/stripe.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
module Stripe
|
2
|
+
class ThreeDSecure < APIResource
|
3
|
+
extend Stripe::APIOperations::Create
|
4
|
+
|
5
|
+
def self.resource_url
|
6
|
+
"/v1/3d_secure"
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.retrieve(id, opts=nil)
|
10
|
+
raise NotImplementedError.new("3D Secure objects cannot be retrieved")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/stripe/util.rb
CHANGED
data/lib/stripe/version.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
require File.expand_path('../../test_helper', __FILE__)
|
2
|
+
|
3
|
+
module Stripe
|
4
|
+
class ThreeDSecureTest < Test::Unit::TestCase
|
5
|
+
should "create should return a new 3D Secure object" do
|
6
|
+
@mock.expects(:post).once.returns(make_response(make_three_d_secure))
|
7
|
+
tds = Stripe::ThreeDSecure.create(
|
8
|
+
:card => "tok_test",
|
9
|
+
:amount => 1500,
|
10
|
+
:currency => "usd",
|
11
|
+
:return_url => "https://example.org/3d-secure-result"
|
12
|
+
)
|
13
|
+
assert_equal "tdsrc_test", tds.id
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/test/test_data.rb
CHANGED
@@ -833,5 +833,20 @@ module Stripe
|
|
833
833
|
]
|
834
834
|
}
|
835
835
|
end
|
836
|
+
|
837
|
+
def make_three_d_secure(params={})
|
838
|
+
{
|
839
|
+
:id => 'tdsrc_test',
|
840
|
+
:object => 'three_d_secure',
|
841
|
+
:amount => 1500,
|
842
|
+
:authenticate => true,
|
843
|
+
:card => make_card,
|
844
|
+
:created => 1456908210,
|
845
|
+
:currency => 'usd',
|
846
|
+
:livemode => false,
|
847
|
+
:redirect_url => nil,
|
848
|
+
:status => 'succeeded',
|
849
|
+
}.merge(params)
|
850
|
+
end
|
836
851
|
end
|
837
852
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.48.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -94,6 +94,7 @@ files:
|
|
94
94
|
- lib/stripe/sku.rb
|
95
95
|
- lib/stripe/stripe_object.rb
|
96
96
|
- lib/stripe/subscription.rb
|
97
|
+
- lib/stripe/three_d_secure.rb
|
97
98
|
- lib/stripe/token.rb
|
98
99
|
- lib/stripe/transfer.rb
|
99
100
|
- lib/stripe/util.rb
|
@@ -132,6 +133,7 @@ files:
|
|
132
133
|
- test/stripe/sku_test.rb
|
133
134
|
- test/stripe/stripe_object_test.rb
|
134
135
|
- test/stripe/subscription_test.rb
|
136
|
+
- test/stripe/three_d_secure_test.rb
|
135
137
|
- test/stripe/transfer_test.rb
|
136
138
|
- test/stripe/util_test.rb
|
137
139
|
- test/stripe_test.rb
|
@@ -195,6 +197,7 @@ test_files:
|
|
195
197
|
- test/stripe/sku_test.rb
|
196
198
|
- test/stripe/stripe_object_test.rb
|
197
199
|
- test/stripe/subscription_test.rb
|
200
|
+
- test/stripe/three_d_secure_test.rb
|
198
201
|
- test/stripe/transfer_test.rb
|
199
202
|
- test/stripe/util_test.rb
|
200
203
|
- test/stripe_test.rb
|