cobro_digital 1.4.2 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cobro_digital.gemspec +8 -7
- data/lib/cobro_digital/meta.rb +7 -34
- data/lib/cobro_digital/operador.rb +7 -11
- data/lib/cobro_digital/transaccion.rb +0 -10
- data/lib/cobro_digital/version.rb +1 -1
- data/lib/cobro_digital.rb +3 -2
- metadata +19 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed84e8e9e7e570e79f2401fdaee89a843f2b508fe40d5c552c9db460378d68c4
|
4
|
+
data.tar.gz: 93a257686ff8ca399f544542e1713d88444944febc4bbd070048dc02e91d229f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c0a955a9d1c56e5c3307deed961035ca6e163c0feb87b637be873764f29f166211bc976f8a7203f65500b90e46becb5bcac32ef35eeeb01dd994cfe0040dd77
|
7
|
+
data.tar.gz: b1f64885f0cee5ec406af33374671010f7bea925307153194509aec1b2b730bc777dcf7a4adb43372c4c6d37563c9e6e5286a3aa8d9bce8c8107803e042ab10a
|
data/cobro_digital.gemspec
CHANGED
@@ -27,14 +27,15 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
|
-
spec.add_development_dependency "bundler", "~>
|
31
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
30
|
+
spec.add_development_dependency "bundler", "~> 2.3.4"
|
31
|
+
# spec.add_development_dependency "rake", "~> 10.0"
|
32
|
+
spec.add_development_dependency "rake", ">= 13.0.6"
|
32
33
|
# spec.add_development_dependency "rspec"
|
33
34
|
|
34
|
-
spec.add_runtime_dependency 'savon', '~> 2.
|
35
|
+
spec.add_runtime_dependency 'savon', '~> 2.12.1'
|
35
36
|
|
36
|
-
spec.add_dependency 'nokogiri', '~> 1.
|
37
|
-
spec.add_dependency 'wasabi', '~> 3.
|
38
|
-
spec.add_dependency 'akami', '~> 1.1'
|
39
|
-
spec.add_dependency 'nori', '~> 2.
|
37
|
+
spec.add_dependency 'nokogiri', '~> 1.10.10'
|
38
|
+
spec.add_dependency 'wasabi', '~> 3.5.0'
|
39
|
+
spec.add_dependency 'akami', '~> 1.3.1'
|
40
|
+
spec.add_dependency 'nori', '~> 2.6.0'
|
40
41
|
end
|
data/lib/cobro_digital/meta.rb
CHANGED
@@ -5,18 +5,18 @@ module CobroDigital
|
|
5
5
|
|
6
6
|
# md5(microtime(true)*rand())
|
7
7
|
# { 'handshake'=>Digest::MD5.hexdigest(Time.now.to_f.to_s),
|
8
|
-
|
9
|
-
|
8
|
+
# 'metodo_webservice'=>'meta',
|
9
|
+
# '0' => { 'metodo_webservice' => 'crear_pagador',
|
10
10
|
# 'handshake' => Digest::MD5.hexdigest(Time.now.to_f.to_s),
|
11
11
|
# 'pagador' => { 'Nombre' => 'Juan',
|
12
12
|
# 'Su_identificador' => '1AF8',
|
13
13
|
# 'Unidad' => '201' } },
|
14
|
-
|
14
|
+
# '1' => { 'metodo_webservice' => 'crear_pagador',
|
15
15
|
# 'handshake' => Digest::MD5.hexdigest(Time.now.to_f.to_s),
|
16
16
|
# 'pagador'=> { 'Nombre'=>'Pedro',
|
17
17
|
# 'Su_identificador'=>'1AG9',
|
18
18
|
# 'Unidad'=>'202' } },
|
19
|
-
|
19
|
+
# '2' => { 'metodo_webservice' => 'generar_boleta',
|
20
20
|
# 'handshake' => Digest::MD5.hexdigest(Time.now.to_f.to_s),
|
21
21
|
# 'identificador' => 'Su_identificador',
|
22
22
|
# 'buscar' => '1AF8',
|
@@ -24,7 +24,7 @@ module CobroDigital
|
|
24
24
|
# 'fechas_vencimiento' => ['20160930'],
|
25
25
|
# 'plantilla' => 'init',
|
26
26
|
# 'concepto' => 'Test I'},
|
27
|
-
|
27
|
+
# '3' => { 'metodo_webservice' => 'generar_boleta',
|
28
28
|
# 'handshake' => Digest::MD5.hexdigest(Time.now.to_f.to_s),
|
29
29
|
# 'identificador' => 'Su_identificador',
|
30
30
|
# 'buscar' => '1AG9',
|
@@ -32,10 +32,10 @@ module CobroDigital
|
|
32
32
|
# 'fechas_vencimiento' => ['20160929'],
|
33
33
|
# 'plantilla' => 'init',
|
34
34
|
# 'concepto' => 'Test II'},
|
35
|
-
|
35
|
+
# '4' => { 'metodo_webservice' => 'inhabilitar_boleta',
|
36
36
|
# 'handshake' => Digest::MD5.hexdigest(Time.now.to_f.to_s),
|
37
37
|
# 'nro_boleta' => '4' },
|
38
|
-
|
38
|
+
# '5' => { 'metodo_webservice' => 'inhabilitar_boleta',
|
39
39
|
# 'handshake' => Digest::MD5.hexdigest(Time.now.to_f.to_s),
|
40
40
|
# 'nro_boleta' => '65' } }
|
41
41
|
|
@@ -68,32 +68,5 @@ module CobroDigital
|
|
68
68
|
:render => render(objs)
|
69
69
|
)
|
70
70
|
end
|
71
|
-
|
72
|
-
def parse_response
|
73
|
-
output = response.body[:webservice_cobrodigital_response][:output]
|
74
|
-
|
75
|
-
parsed_response = JSON.parse(output)
|
76
|
-
|
77
|
-
datos = if parsed_response.key?('datos')
|
78
|
-
parsed_response['datos'].map do |data|
|
79
|
-
parsed_data = JSON.parse(data)
|
80
|
-
|
81
|
-
local_data = if parsed_data['datos'].present?
|
82
|
-
JSON.parse(parsed_data['datos'].first) rescue []
|
83
|
-
else
|
84
|
-
[]
|
85
|
-
end
|
86
|
-
|
87
|
-
{ resultado: (parsed_data['ejecucion_correcta'] == '1'),
|
88
|
-
log: parsed_data['log'],
|
89
|
-
datos: local_data }
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
|
-
{ resultado: (parsed_response['ejecucion_correcta'] == '1'),
|
94
|
-
log: parsed_response['log'],
|
95
|
-
datos: datos }
|
96
|
-
end
|
97
|
-
|
98
71
|
end
|
99
72
|
end
|
@@ -20,20 +20,16 @@ module CobroDigital
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def parse_response
|
23
|
-
|
23
|
+
output = response.body[:webservice_cobrodigital_response][:output]
|
24
|
+
parsed_response = JSON.parse(output)
|
24
25
|
|
25
|
-
|
26
|
+
raw_datos = parsed_response['datos'] || []
|
26
27
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
_data.delete("")
|
31
|
-
datos << _data
|
32
|
-
end
|
33
|
-
end
|
28
|
+
datos = raw_datos.map do |row|
|
29
|
+
row.is_a?(Array) ? row : (JSON.parse(row) rescue row)
|
30
|
+
end.flatten
|
34
31
|
|
35
|
-
{ resultado: (parsed_response['ejecucion_correcta'] == '1'), log: parsed_response['log'], datos:
|
32
|
+
{ resultado: (parsed_response['ejecucion_correcta'] == '1'), log: parsed_response['log'], datos: datos }
|
36
33
|
end
|
37
|
-
|
38
34
|
end
|
39
35
|
end
|
@@ -31,15 +31,5 @@ module CobroDigital
|
|
31
31
|
:render => render(desde, hasta, filtros)
|
32
32
|
)
|
33
33
|
end
|
34
|
-
|
35
|
-
def parse_response
|
36
|
-
output = response.body[:webservice_cobrodigital_response][:output]
|
37
|
-
parsed_response = JSON.parse(output)
|
38
|
-
|
39
|
-
datos = parsed_response['datos'].present? ? (JSON.parse(JSON.parse(output)['datos'].first) rescue []) : []
|
40
|
-
|
41
|
-
{ resultado: (parsed_response['ejecucion_correcta'] == '1'), log: parsed_response['log'], datos: datos }
|
42
|
-
end
|
43
|
-
|
44
34
|
end
|
45
35
|
end
|
data/lib/cobro_digital.rb
CHANGED
@@ -14,8 +14,9 @@ module CobroDigital
|
|
14
14
|
HTTPS = 'https'
|
15
15
|
|
16
16
|
CLIENTS = [SOAP, HTTPS]
|
17
|
-
URI = 'https://
|
18
|
-
WSDL = 'https://
|
17
|
+
URI = ((ENV['ENDPOINT_COBRODIGITAL'] || 'https://cobro.digital:14365') + '/ws3/').freeze
|
18
|
+
WSDL = ((ENV['ENDPOINT_COBRODIGITAL'] || 'https://cobro.digital:14365') + '/ws3/?wsdl').freeze
|
19
|
+
|
19
20
|
TIMEOUT = 300
|
20
21
|
|
21
22
|
module Https
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cobro_digital
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- g.edera
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,98 +16,98 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.3.4
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.3.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 13.0.6
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 13.0.6
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: savon
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 2.12.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 2.12.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: nokogiri
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 1.10.10
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 1.10.10
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: wasabi
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 3.5.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 3.5.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: akami
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 1.3.1
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 1.3.1
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: nori
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 2.6.0
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 2.6.0
|
111
111
|
description: Adaptador para el Web Service de CobroDigital
|
112
112
|
email:
|
113
113
|
- gab.edera@gmail.com
|
@@ -153,8 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: '0'
|
155
155
|
requirements: []
|
156
|
-
|
157
|
-
rubygems_version: 2.7.7
|
156
|
+
rubygems_version: 3.2.3
|
158
157
|
signing_key:
|
159
158
|
specification_version: 4
|
160
159
|
summary: Adaptador CobroDigital
|