fdis 0.1.5 → 0.1.7

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
  SHA256:
3
- metadata.gz: 21bc4b020912a2661d008154d964fc7b2d909fff877cdcd8bf9ab69fd8a6ea45
4
- data.tar.gz: fbc6eb4c743f0f5db1390d3d45375ee9a5ba12c9d0901e74874742dd68f3a371
3
+ metadata.gz: af3f9899b4bb678e8a054349e34ca808e6533b8797a2bba13aabb45b54133e6c
4
+ data.tar.gz: 783b74699c9546a2d9598d1c497bea8826d889f7866e5cbaa51928b5fd150656
5
5
  SHA512:
6
- metadata.gz: 07eed3e12994199cfba922b7c52e75e1ac0a50edbea0bdfe8c847fce4bb8527df3567654b2736ec6849ca306d415410229830deae662b2ec96d74dede2101a50
7
- data.tar.gz: ed0b0606f67da6cc96f027f44b4bf07dd9acab401aae35f0437ee09a3e660f77db83c0d75b17e2fb46a8ac8b759193c5b29d436bfbabe388a1e75fdda3c5584b
6
+ metadata.gz: 241b331dc599408fc797ebde4353338b55c9083253f9b66202113212b98f08c1605381e7af1c8e38a940e7372bff17ee7a31a42dace0b7fb017a18395347de14
7
+ data.tar.gz: 84f07a0fdb7285a8d79e72e802a790726ee551fe1a911e5b53789533bfade46902e5f29881b59ec2d3dacb8540e2265a2f4ddcbb9c6a1ea933f432cfb610206d
data/lib/fdis/config.rb CHANGED
@@ -33,10 +33,8 @@ module Fdis
33
33
  def key_to_pem
34
34
  puts "---- Fdis:config:key_to_pem"
35
35
 
36
- puts "-- 1"
37
36
  @pem = %x[openssl pkcs8 -inform DER -in #{@doc_key_path} -passin pass:#{@key_pass}]
38
37
  # @pem = %x[openssl rsa -inform DER -in #{@doc_key_path} -passin pass:#{@key_pass}]
39
- puts "-- 2"
40
38
  @pem_cadena = @pem.clone
41
39
  @pem_cadena.slice!("-----BEGIN PRIVATE KEY-----")
42
40
  @pem_cadena.slice!("-----END PRIVATE KEY-----")
@@ -243,7 +243,7 @@ module Fdis
243
243
  else
244
244
  response = {
245
245
  status: json_response.code,
246
- message_error: "Error: #{json_response.message}",
246
+ message_error: "Error: #{response['errorMessages']}",
247
247
  xml: '',
248
248
  uuid: '',
249
249
  fecha_timbrado: '',
@@ -520,7 +520,7 @@ module Fdis
520
520
 
521
521
 
522
522
  base_doc = %(<?xml version="1.0" encoding="utf-8"?>
523
- <cfdi:Comprobante xsi:schemaLocation="http://www.sat.gob.mx/cfd/4 http://www.sat.gob.mx/sitio_internet/cfd/4/cfdv40.xsd" Version="4.0" xmlns:cfdi="http://www.sat.gob.mx/cfd/4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Fecha="" Serie="" Folio="" FormaPago="" SubTotal="" Moneda="MXN" Total="" TipoDeComprobante="I" MetodoPago="" LugarExpedicion="" Certificado="" NoCertificado="" Sello="" >
523
+ <cfdi:Comprobante xsi:schemaLocation="http://www.sat.gob.mx/cfd/4 http://www.sat.gob.mx/sitio_internet/cfd/4/cfdv40.xsd" Version="4.0" xmlns:cfdi="http://www.sat.gob.mx/cfd/4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Fecha="" Serie="" Folio="" FormaPago="" SubTotal="" Moneda="MXN" Total="" TipoDeComprobante="I" MetodoPago="" LugarExpedicion="" Certificado="" NoCertificado="" Sello="" Exportacion="01">
524
524
 
525
525
  <cfdi:Emisor Rfc="" Nombre="" RegimenFiscal="" />
526
526
  <cfdi:Receptor Rfc="" Nombre="" DomicilioFiscalReceptor="" RegimenFiscalReceptor="" UsoCFDI="" />
@@ -777,6 +777,9 @@ module Fdis
777
777
  http.request(request)
778
778
  end
779
779
 
780
+ puts "---- Fdis: request"
781
+ puts "-- body: #{request.body} --"
782
+
780
783
  puts "---- Fdis: Respuesta"
781
784
  puts "-- Codigo: #{json_response.code} --"
782
785
  puts "-- Mensaje: #{json_response.message} --"
@@ -818,7 +821,7 @@ module Fdis
818
821
  else
819
822
  response = {
820
823
  status: json_response.code,
821
- message_error: "Error: #{json_response.message}",
824
+ message_error: "Error: #{response['errorMessages']}",
822
825
  xml: '',
823
826
  uuid: '',
824
827
  fecha_timbrado: '',
data/lib/fdis/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fdis
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fdis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angel Padilla