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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 513215f68d166198dcbc83405cacb0fa13fd5fd2
4
- data.tar.gz: ff0687b97a9d4fdd0985798be216696134d2dbde
3
+ metadata.gz: fd1b82b410baf18065f6d9e17dfee702e778e3df
4
+ data.tar.gz: 0ed81d64eb99593417c887739752562fa5e0456c
5
5
  SHA512:
6
- metadata.gz: 19608331dcdedd25b2a13caf99150ebc55ae40f55a00e7e3df9baf6e2c66a0e886e6c1285400a26df5535d9aeb989ffa9210f72bb601f69f1bee66eddfca310e
7
- data.tar.gz: f52399d1c34dc5c2af4474a16b16ef8670c745716796385c1355ec44676cc66ea287a20eef300efde784080b86e9612916f678eb870b3a855d88eaa5396551ec
6
+ metadata.gz: 83638df88f5bdde60b5df0bc95618f8535def3e3bdee7b9065a3437fd57506a654da1bf543b7047b538ccc0ffc0177ad2f7e9d6f52cfa915bc834f1b5668bd01
7
+ data.tar.gz: 1676d86713a7f3ff611e615fdc51c16c9f8457bb83c43c3778c9e64ddc69fcffb2e2930189ca9ee59df0e46eeca6411dcb852712ef3dccfd7d80486d94b7a7bb
data/.travis.yml ADDED
@@ -0,0 +1,2 @@
1
+ rvm:
2
+ - 2.1.2
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Build Status](https://travis-ci.org/div/payture.svg?branch=master)](https://travis-ci.org/div/payture)
2
+
1
3
  # Payture
2
4
 
3
5
  This gems wraps e-walet api of payture.com credit card processing
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Payture
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -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.1
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-08-21 00:00:00.000000000 Z
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