przelewy24 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/przelewy24.rb +3 -2
- data/lib/przelewy24/client.rb +3 -3
- data/lib/przelewy24/ekspres/client.rb +1 -1
- data/lib/przelewy24/{response.rb → http_response.rb} +1 -1
- data/lib/przelewy24/recurring/client.rb +2 -2
- data/lib/przelewy24/soap_response.rb +20 -0
- data/lib/przelewy24/version.rb +1 -1
- metadata +3 -4
- data/lib/przelewy24/ekspres/response.rb +0 -22
- data/lib/przelewy24/recurring/response.rb +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 258c125771dfdd7a8d8c80931fd960dd782df619
|
4
|
+
data.tar.gz: 6dc6e6f040751ffa7f65c2f8a00b74c40bd68bf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 485059e57a4949723ca658e9d3abe2992a6c85a72d851e045339e3ebb1232f6403803e7a65d9cfd378c2996840e8a67fd1136f98c2661fd9b2aa2e413d4018c4
|
7
|
+
data.tar.gz: e9ab398a925fa4a2872e1fd1c7f7a7267b974fba32ddb0ce3d187453899bef4afa15fabf57ff08c07c699a5b7ed1a8e1ba1377ac049d947db30ffbba1e91a91a
|
data/lib/przelewy24.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
require 'przelewy24/ekspres/client'
|
2
|
-
require 'przelewy24/
|
2
|
+
require 'przelewy24/recurring/client'
|
3
3
|
require 'przelewy24/client'
|
4
|
+
require 'przelewy24/http_response'
|
4
5
|
require 'przelewy24/invalid_attributes'
|
5
6
|
require 'przelewy24/invalid_gateway_url'
|
6
|
-
require 'przelewy24/
|
7
|
+
require 'przelewy24/soap_response'
|
7
8
|
require 'przelewy24/transaction'
|
8
9
|
require 'przelewy24/version'
|
9
10
|
|
data/lib/przelewy24/client.rb
CHANGED
@@ -33,7 +33,7 @@ module Przelewy24
|
|
33
33
|
http.request(post)
|
34
34
|
end
|
35
35
|
|
36
|
-
|
36
|
+
HttpResponse.new(response)
|
37
37
|
end
|
38
38
|
|
39
39
|
def create_transaction(data = {})
|
@@ -50,7 +50,7 @@ module Przelewy24
|
|
50
50
|
http.request(post)
|
51
51
|
end
|
52
52
|
|
53
|
-
|
53
|
+
HttpResponse.new(response)
|
54
54
|
end
|
55
55
|
|
56
56
|
def verify_transaction(data = {})
|
@@ -71,7 +71,7 @@ module Przelewy24
|
|
71
71
|
http.request(post)
|
72
72
|
end
|
73
73
|
|
74
|
-
|
74
|
+
HttpResponse.new(response)
|
75
75
|
end
|
76
76
|
end
|
77
77
|
end
|
@@ -14,7 +14,7 @@ module Przelewy24
|
|
14
14
|
'o_transactionIn' => transaction
|
15
15
|
})
|
16
16
|
|
17
|
-
|
17
|
+
SoapResponse.new(response.body[:register_transfer_response][:return])
|
18
18
|
rescue Savon::SOAPFault => error
|
19
19
|
raise InvalidAttributes
|
20
20
|
end
|
@@ -30,7 +30,7 @@ module Przelewy24
|
|
30
30
|
orderId: order_id
|
31
31
|
})
|
32
32
|
|
33
|
-
|
33
|
+
SoapResponse.new(response.body[:get_transaction_reference_response][:return])
|
34
34
|
end
|
35
35
|
|
36
36
|
def charge_card(data = {})
|
@@ -45,7 +45,7 @@ module Przelewy24
|
|
45
45
|
description: data[:description]
|
46
46
|
})
|
47
47
|
|
48
|
-
|
48
|
+
SoapResponse.new(response.body[:charge_card_response][:return])
|
49
49
|
end
|
50
50
|
|
51
51
|
private
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Przelewy24
|
2
|
+
class SoapResponse
|
3
|
+
def initialize(savon_response)
|
4
|
+
@result = savon_response[:result]
|
5
|
+
@error = savon_response[:error]
|
6
|
+
end
|
7
|
+
|
8
|
+
def success?
|
9
|
+
@error[:error_code] == '0'
|
10
|
+
end
|
11
|
+
|
12
|
+
def result
|
13
|
+
@result
|
14
|
+
end
|
15
|
+
|
16
|
+
def error
|
17
|
+
@error
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/przelewy24/version.rb
CHANGED
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
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michał Młoźniak
|
@@ -72,12 +72,11 @@ files:
|
|
72
72
|
- lib/przelewy24.rb
|
73
73
|
- lib/przelewy24/client.rb
|
74
74
|
- lib/przelewy24/ekspres/client.rb
|
75
|
-
- lib/przelewy24/
|
75
|
+
- lib/przelewy24/http_response.rb
|
76
76
|
- lib/przelewy24/invalid_attributes.rb
|
77
77
|
- lib/przelewy24/invalid_gateway_url.rb
|
78
78
|
- lib/przelewy24/recurring/client.rb
|
79
|
-
- lib/przelewy24/
|
80
|
-
- lib/przelewy24/response.rb
|
79
|
+
- lib/przelewy24/soap_response.rb
|
81
80
|
- lib/przelewy24/transaction.rb
|
82
81
|
- lib/przelewy24/version.rb
|
83
82
|
- przelewy24.gemspec
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module Przelewy24
|
2
|
-
module Ekspres
|
3
|
-
class Response
|
4
|
-
def initialize(savon_response)
|
5
|
-
@result = savon_response[:result]
|
6
|
-
@error = savon_response[:error]
|
7
|
-
end
|
8
|
-
|
9
|
-
def success?
|
10
|
-
@error[:error_code] == '0'
|
11
|
-
end
|
12
|
-
|
13
|
-
def result
|
14
|
-
@result
|
15
|
-
end
|
16
|
-
|
17
|
-
def error
|
18
|
-
@error
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module Przelewy24
|
2
|
-
module Recurring
|
3
|
-
class Response
|
4
|
-
def initialize(savon_response)
|
5
|
-
@result = savon_response[:result]
|
6
|
-
@error = savon_response[:error]
|
7
|
-
end
|
8
|
-
|
9
|
-
def success?
|
10
|
-
@error[:error_code] == '0'
|
11
|
-
end
|
12
|
-
|
13
|
-
def result
|
14
|
-
@result
|
15
|
-
end
|
16
|
-
|
17
|
-
def error
|
18
|
-
@error
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|