puntopagos 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/puntopagos/notification.rb +4 -4
- data/lib/puntopagos/version.rb +1 -1
- metadata +1 -1
@@ -21,8 +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
|
-
|
25
|
-
|
24
|
+
Rails.logger.info "Generated Message: #{message}"
|
25
|
+
Rails.logger.info "Generated Signature #{signature}"
|
26
26
|
@verification = PuntoPagos::Verification.new(@env)
|
27
27
|
(signature == pp_signature(headers)) and (@verification.verify(params["token"], params["trx_id"], params["monto"].to_i.to_s + ".00"))
|
28
28
|
|
@@ -54,7 +54,7 @@ module PuntoPagos
|
|
54
54
|
#
|
55
55
|
# Returns the Autorizacion HTTP Header value.
|
56
56
|
def pp_signature headers
|
57
|
-
|
57
|
+
Rails.logger.info "Notification Authorization: #{headers['Autorizacion']}"
|
58
58
|
headers['Autorizacion']
|
59
59
|
end
|
60
60
|
|
@@ -64,7 +64,7 @@ module PuntoPagos
|
|
64
64
|
#
|
65
65
|
# Returns the Fecha HTTP Header value.
|
66
66
|
def get_timestamp headers
|
67
|
-
|
67
|
+
Rails.logger.info "Notification Date #{headers['Fecha']}"
|
68
68
|
headers['Fecha']
|
69
69
|
end
|
70
70
|
end
|
data/lib/puntopagos/version.rb
CHANGED