catarse_compra_facil 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/catarse_compra_facil.rb +16 -2
- data/lib/catarse_compra_facil/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f57730cdd4b7346a1d7b21835053757fc26c979
|
4
|
+
data.tar.gz: 151a464c6b64a3d3339060ba6381a6f88bc27977
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18a30a13107d1954d64947548b394f5134298000f5e0059bc3bf8d59c73b87a20f97b4d4ba1559945f754f6dcbd66fe869d8d5685cc518cd155e1639eb1f7da6
|
7
|
+
data.tar.gz: 91ddc175cc7fca4e5babaae3c0fa2d50f7f20316a8fa12b44d137b0f69f148f91db19d2921ec03e3c76e15a4cd204b23ee0a1780de0d47d78c52550fb8b1f854
|
data/lib/catarse_compra_facil.rb
CHANGED
@@ -22,7 +22,9 @@ module CatarseCompraFacil
|
|
22
22
|
:reference,
|
23
23
|
:entity,
|
24
24
|
:error,
|
25
|
-
:payment_company
|
25
|
+
:payment_company,
|
26
|
+
:payed,
|
27
|
+
:state
|
26
28
|
|
27
29
|
attr_reader :user_type, :server_address, :insert_mode
|
28
30
|
|
@@ -80,8 +82,20 @@ module CatarseCompraFacil
|
|
80
82
|
self.reference = response.to_hash[:save_compra_to_bd_valor1_response][:referencia]
|
81
83
|
self.entity = response.to_hash[:save_compra_to_bd_valor1_response][:entidade]
|
82
84
|
end
|
85
|
+
puts response.to_hash;
|
86
|
+
end
|
83
87
|
|
84
|
-
|
88
|
+
def get_order_information!
|
89
|
+
client = Savon.client(wsdl: self.server_address)
|
90
|
+
message = { "referencia" => self.reference,
|
91
|
+
"IDCliente" => self.user,
|
92
|
+
:password => self.password
|
93
|
+
}
|
94
|
+
response = client.call(:get_info_compra, message: message)
|
95
|
+
if response.success?
|
96
|
+
self.payed = response.to_hash[:get_info_compra_response][:pago]
|
97
|
+
self.state = response.to_hash[:get_info_compra_response][:estado]
|
98
|
+
end
|
85
99
|
puts response.to_hash;
|
86
100
|
end
|
87
101
|
|