przelewy24 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,32 @@
1
+ require 'savon'
2
+
3
+ module Przelewy24
4
+ module Ekspres
5
+ class Client
6
+ def initialize(login, password)
7
+ @login = login
8
+ @password = password
9
+ end
10
+
11
+ def register_transfer(transaction)
12
+ client.call(:register_transfer, message: {
13
+ 'authorizeIn' => authorization_object,
14
+ 'o_transactionIn' => transaction
15
+ })
16
+ end
17
+
18
+ private
19
+
20
+ def client
21
+ @client ||= Savon::Client.new(wsdl: 'https://ekspres.przelewy24.pl/wsdl/pay/service_sandbox.php?wsdl')
22
+ end
23
+
24
+ def authorization_object
25
+ {
26
+ login: @login,
27
+ pass: @password
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -1,3 +1,3 @@
1
1
  module Przelewy24
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
data/lib/przelewy24.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'przelewy24/ekspres/client'
1
2
  require 'przelewy24/client'
2
3
  require 'przelewy24/invalid_gateway_url'
3
4
  require 'przelewy24/response'
data/przelewy24.gemspec CHANGED
@@ -21,4 +21,6 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.add_development_dependency "bundler", "~> 1.8"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
+
25
+ spec.add_runtime_dependency "savon", "~> 2.0"
24
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: przelewy24
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2015-05-20 00:00:00.000000000 Z
12
+ date: 2015-06-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -43,6 +43,22 @@ dependencies:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
45
  version: '10.0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: savon
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '2.0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '2.0'
46
62
  description: Integration with Przelewy24 payment gateway.
47
63
  email:
48
64
  - m.mlozniak@gmail.com
@@ -62,6 +78,7 @@ files:
62
78
  - bin/setup
63
79
  - lib/przelewy24.rb
64
80
  - lib/przelewy24/client.rb
81
+ - lib/przelewy24/ekspres/client.rb
65
82
  - lib/przelewy24/invalid_gateway_url.rb
66
83
  - lib/przelewy24/response.rb
67
84
  - lib/przelewy24/transaction.rb