culqi 1.2.4 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9bc36f56cb357c471b065971d0c42e321c74720a
4
- data.tar.gz: baa4220c0a4d6e4bc5d5093e375fd9b2993d64d4
3
+ metadata.gz: 17b0333df0e347dbb86845d07d965ea7873460a0
4
+ data.tar.gz: bf262fc7a9bb43c171f3faa25e0d2cad747c80c6
5
5
  SHA512:
6
- metadata.gz: 2c2a45182dadfee66ddb125afc543fb3e6f222a3a854b39a302a4377648f39e4570e32d985f4952e1734b154e3676ad7eca41270d748384c97f419074443bd79
7
- data.tar.gz: 04c5e89f144ffc757e072dadf69e2b6a808e9fb6550b72a2f6e0b661f373dfc38c5c5016783fe2850f84ce7ebdb8e827059adc042eba0e37cfb43421a9474289
6
+ metadata.gz: 464eef7cdff3039811b96d676962921741fec8076a593a23824c15c8540fa7488769006ec26a10a18414c6ca65989a2be27840e5da44b6e5a82af5159c5aac9e
7
+ data.tar.gz: 5b9a7c450f51bbe1ad3780c4a66e49b624e767df2ebf0c0ebc7b436a542dc4ce953d06fac3170b771e292fb7d080c5fca61e68d2d0fa6ce351d43ea3105c8460
data/README.md CHANGED
@@ -78,6 +78,7 @@ culqi = Culqi.default_client
78
78
  #creamos la venta
79
79
 
80
80
  datos_venta = {
81
+ codigo_comercio: ENV['CULQI_CODIGO_COMERCIO']
81
82
  numero_pedido: '12367',
82
83
  moneda: 'PEN',
83
84
  monto: '5000',
data/lib/culqi/client.rb CHANGED
@@ -14,7 +14,6 @@ module Culqi
14
14
  end
15
15
 
16
16
  def crear_venta(attrs)
17
- attrs.merge!(:codigo_comercio => ENV['CULQI_CODIGO_COMERCIO'])
18
17
  sale = Culqi::Sale.new(attrs)
19
18
  request = http_request(sale.payload)
20
19
 
data/lib/culqi/sale.rb CHANGED
@@ -25,6 +25,7 @@ module Culqi
25
25
 
26
26
  def payload
27
27
  {
28
+ codigo_comercio: (codigo_comercio || ENV['CULQI_CODIGO_COMERCIO']),
28
29
  numero_pedido: numero_pedido,
29
30
  moneda: (moneda || DEFAULTS[:moneda]),
30
31
  monto: monto,
@@ -36,8 +37,7 @@ module Culqi
36
37
  num_tel: num_tel[0..14],
37
38
  id_usuario_comercio: id_usuario_comercio,
38
39
  nombres: nombres[0..49],
39
- apellidos: apellidos[0..49],
40
- codigo_comercio: (codigo_comercio || ENV['CULQI_CODIGO_COMERCIO'])
40
+ apellidos: apellidos[0..49]
41
41
  }.to_json
42
42
  end
43
43
  end
data/lib/culqi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Culqi
2
- VERSION = '1.2.4'
2
+ VERSION = '1.2.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: culqi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Augusto Samame