Permalink
Browse files

logging post body

  • Loading branch information...
1 parent e4cb5fe commit 7b71f2d5c44ab18fcef201e2245ec0c9ce645c87 @rafaelss committed May 14, 2012
Showing with 12 additions and 3 deletions.
  1. +4 −1 lib/cielo/authorization_request.rb
  2. +4 −1 lib/cielo/capture_request.rb
  3. +4 −1 lib/cielo/transaction_request.rb
View
5 lib/cielo/authorization_request.rb
@@ -15,7 +15,10 @@ def authorize
http.read_timeout = 40 * 1000
Cielo.logger.info(http.inspect)
- response = http.request_post(Cielo.configuration.path, "mensagem=#{to_xml}")
+ post_body = "mensagem=#{to_xml}"
+ Cielo.logger.info(post_body)
+
+ response = http.request_post(Cielo.configuration.path, post_body)
Cielo.logger.info(response.body)
Transaction.parse(response.body, :single => true)
View
5 lib/cielo/capture_request.rb
@@ -15,7 +15,10 @@ def capture
http.read_timeout = 40 * 1000
Cielo.logger.info(http.inspect)
- response = http.request_post(Cielo.configuration.path, "mensagem=#{to_xml}")
+ post_body = "mensagem=#{to_xml}"
+ Cielo.logger.info(post_body)
+
+ response = http.request_post(Cielo.configuration.path, post_body)
Cielo.logger.info(response.body)
Transaction.parse(response.body, :single => true)
View
5 lib/cielo/transaction_request.rb
@@ -22,7 +22,10 @@ def create
http.read_timeout = 40 * 1000
Cielo.logger.info(http.inspect)
- response = http.request_post(Cielo.configuration.path, "mensagem=#{to_xml}")
+ post_body = "mensagem=#{to_xml}"
+ Cielo.logger.info(post_body)
+
+ response = http.request_post(Cielo.configuration.path, post_body)
Cielo.logger.info(response.body)
Transaction.parse(response.body, :single => true)

0 comments on commit 7b71f2d

Please sign in to comment.