puntopagos 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,6 +21,8 @@ module PuntoPagos
21
21
  message = create_message params["token"], params["trx_id"], params["monto"].to_s, timestamp
22
22
  authorization = Authorization.new(@env)
23
23
  signature = authorization.sign(message)
24
+ puts "Generated Message: #{message}"
25
+ puts "Generated Signature #{signature}"
24
26
  @verification = PuntoPagos::Verification.new(@env)
25
27
  (signature == pp_signature(headers)) and (@verification.verify(params["token"], params["trx_id"], params["monto"].to_i.to_s + ".00"))
26
28
 
@@ -52,6 +54,7 @@ module PuntoPagos
52
54
  #
53
55
  # Returns the Autorizacion HTTP Header value.
54
56
  def pp_signature headers
57
+ puts "Notification Authorization: #{headers['Autorizacion']}"
55
58
  headers['Autorizacion']
56
59
  end
57
60
 
@@ -61,6 +64,7 @@ module PuntoPagos
61
64
  #
62
65
  # Returns the Fecha HTTP Header value.
63
66
  def get_timestamp headers
67
+ puts "Notification Date #{headers['Fecha']}"
64
68
  headers['Fecha']
65
69
  end
66
70
  end
@@ -8,7 +8,7 @@ module PuntoPagos
8
8
  @@config ||= PuntoPagos::Config.new(env)
9
9
  @@function = "transaccion/traer"
10
10
  @@path = "transaccion"
11
- @response = nil
11
+ @response = {}
12
12
  end
13
13
 
14
14
  # Public: Signs a string using the secret and api-key defined in puntopagos.yml
@@ -35,7 +35,7 @@ module PuntoPagos
35
35
  end
36
36
 
37
37
  def error
38
- @response['error']
38
+ @response
39
39
  end
40
40
 
41
41
  private
@@ -1,3 +1,3 @@
1
1
  module PuntoPagos
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puntopagos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: