payture_ruby 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/README.md +2 -0
- data/lib/payture/client/vwapi.rb +1 -1
- data/lib/payture/version.rb +1 -1
- data/test/cassettes/init/existing_user.yml +37 -0
- data/test/payture/client/vwapi_test.rb +22 -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: fd1b82b410baf18065f6d9e17dfee702e778e3df
|
4
|
+
data.tar.gz: 0ed81d64eb99593417c887739752562fa5e0456c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83638df88f5bdde60b5df0bc95618f8535def3e3bdee7b9065a3437fd57506a654da1bf543b7047b538ccc0ffc0177ad2f7e9d6f52cfa915bc834f1b5668bd01
|
7
|
+
data.tar.gz: 1676d86713a7f3ff611e615fdc51c16c9f8457bb83c43c3778c9e64ddc69fcffb2e2930189ca9ee59df0e46eeca6411dcb852712ef3dccfd7d80486d94b7a7bb
|
data/.travis.yml
ADDED
data/README.md
CHANGED
data/lib/payture/client/vwapi.rb
CHANGED
@@ -4,7 +4,7 @@ module Payture
|
|
4
4
|
class Client
|
5
5
|
module Vwapi
|
6
6
|
|
7
|
-
API_METHODS = %w(Register Update Delete Add Activate Remove GetList Pay Refund PayStatus)
|
7
|
+
API_METHODS = %w(Register Update Delete Add Activate Remove GetList Pay Refund PayStatus Init)
|
8
8
|
|
9
9
|
API_METHODS.each do |method_name|
|
10
10
|
underscore_method_name = Payture::Helper.convert_to_underscore method_name
|
data/lib/payture/version.rb
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://sandbox.payture.com/vwapi/Init?DATA=SessionType%253DBlock%253BVWUserLgn%253Dfucker1%2540dom.com%253BVWUserPsw%253D123%253Bip%253D123.123.122.111%253Bamount%253D1000%253BOrderId%253Dasdfasfafa1234&VWID=VWMerchant
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/xml; charset=utf-8
|
12
|
+
User-Agent:
|
13
|
+
- Payture Ruby Gem 0.0.1
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx
|
23
|
+
Date:
|
24
|
+
- Wed, 10 Sep 2014 22:43:29 GMT
|
25
|
+
Content-Type:
|
26
|
+
- text/xml; charset=utf-8
|
27
|
+
Content-Length:
|
28
|
+
- '134'
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
body:
|
32
|
+
encoding: UTF-8
|
33
|
+
string: <Init Success="True" OrderId="asdfasfafa1234" Amount="1000" SessionId="9769cd7a-b7f5-4c6a-9672-6dc87ec42960"
|
34
|
+
SessionType="Block" />
|
35
|
+
http_version:
|
36
|
+
recorded_at: Wed, 10 Sep 2014 22:43:29 GMT
|
37
|
+
recorded_with: VCR 2.9.2
|
@@ -256,5 +256,27 @@ module Payture
|
|
256
256
|
end
|
257
257
|
end
|
258
258
|
end
|
259
|
+
|
260
|
+
describe '.init' do
|
261
|
+
let(:email) { 'fucker1@dom.com' }
|
262
|
+
let(:card_id) { "e43544ba-cf4f-4702-85ef-313df89577eb" }
|
263
|
+
let(:options) {
|
264
|
+
{
|
265
|
+
session_type: 'Block',
|
266
|
+
v_w_user_lgn: email,
|
267
|
+
v_w_user_psw: 123,
|
268
|
+
ip: '123.123.122.111',
|
269
|
+
amount: 1000,
|
270
|
+
order_id: 'asdfasfafa1234'
|
271
|
+
}
|
272
|
+
}
|
273
|
+
subject { client.init options }
|
274
|
+
|
275
|
+
it "returns success status" do
|
276
|
+
VCR.use_cassette('init/existing_user') do
|
277
|
+
subject.success.must_equal "True"
|
278
|
+
end
|
279
|
+
end
|
280
|
+
end
|
259
281
|
end
|
260
282
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: payture_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Davydov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -158,6 +158,7 @@ extensions: []
|
|
158
158
|
extra_rdoc_files: []
|
159
159
|
files:
|
160
160
|
- ".gitignore"
|
161
|
+
- ".travis.yml"
|
161
162
|
- Gemfile
|
162
163
|
- LICENSE.txt
|
163
164
|
- README.md
|
@@ -181,6 +182,7 @@ files:
|
|
181
182
|
- test/cassettes/add/new_user/existing_card.yml
|
182
183
|
- test/cassettes/add/new_user/new_card.yml
|
183
184
|
- test/cassettes/get_list/existing_user.yml
|
185
|
+
- test/cassettes/init/existing_user.yml
|
184
186
|
- test/cassettes/pay/existing_user/active_card.yml
|
185
187
|
- test/cassettes/pay/existing_user/inactive_card.yml
|
186
188
|
- test/cassettes/register/duplicate.yml
|
@@ -219,6 +221,7 @@ test_files:
|
|
219
221
|
- test/cassettes/add/new_user/existing_card.yml
|
220
222
|
- test/cassettes/add/new_user/new_card.yml
|
221
223
|
- test/cassettes/get_list/existing_user.yml
|
224
|
+
- test/cassettes/init/existing_user.yml
|
222
225
|
- test/cassettes/pay/existing_user/active_card.yml
|
223
226
|
- test/cassettes/pay/existing_user/inactive_card.yml
|
224
227
|
- test/cassettes/register/duplicate.yml
|