punto_pagos_rails 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/punto_pagos_rails/application.css +1 -34
  3. data/lib/generators/punto_pagos_rails/payment_flow/payment_flow_generator.rb +2 -2
  4. data/lib/generators/punto_pagos_rails/payment_flow/templates/error.html.erb +3 -5
  5. data/lib/generators/punto_pagos_rails/payment_flow/templates/success.html.erb +3 -5
  6. data/lib/generators/punto_pagos_rails/payment_flow/templates/transactions_controller.rb.erb +4 -18
  7. data/lib/punto_pagos_rails/transaction_service.rb +23 -9
  8. data/lib/punto_pagos_rails/version.rb +1 -1
  9. data/spec/dummy/app/controllers/transactions_controller.rb +4 -18
  10. data/spec/dummy/app/views/transactions/error.html.erb +3 -6
  11. data/spec/dummy/app/views/transactions/success.html.erb +3 -6
  12. data/spec/dummy/db/development.sqlite3 +0 -0
  13. data/spec/dummy/log/development.log +196 -0
  14. data/spec/dummy/log/test.log +8171 -0
  15. data/spec/dummy/spec/controllers/transactions_controller_spec.rb +4 -9
  16. data/spec/dummy/spec/lib/punto_pagos_rails/transaction_service_spec.rb +18 -0
  17. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/30/30-UXxRmLD2vmVGVu7gZMaz_gSlFO8KTmkJl4zx5zcY.cache +1 -0
  18. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/HT/HT55sL83KvJ-NRz9pru5aQzroueKzMMnMEah6E7MAvY.cache +2 -0
  19. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Jm/Jm_Qbvc8i-UdZrFbEYqrDQvtXT0qRqepZE7VXIG5_EU.cache +0 -0
  20. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/l-/l-MrNKRa0-E8qVD4LT5Kjg50zAlziPyfhhOGfsV0KMQ.cache +1 -0
  21. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oC/ocIOUStgLczqxCZEZvXLF-6ARJLE2Gx3UFhbabbM094.cache +2 -0
  22. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uJ/uJSI3kUSsbjut4Cwj7WrhGwwnEB1vCd3Pe2fbI5SU4k.cache +0 -0
  23. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/un/un4CV9-W0TLVlFJFc3m-r9KEyxaymOlHKKpGpPOn37s.cache +2 -0
  24. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46423d040b682f55221e24263fe41b0adbcd6bfb
4
- data.tar.gz: 0c1267c2339d7a06180f3c48664ac3f58a21e113
3
+ metadata.gz: 22a842da24f287a8fd4290592dfe153533d2c7f6
4
+ data.tar.gz: 6feae76ee8c4a5becba59993401e5d0b72794faf
5
5
  SHA512:
6
- metadata.gz: f9bcbc431cab2893c4ded6c84ae6d4ce3e98b4f8427218c5ad08b6ffd71edc839faa9ca5cd117c15d8f01dc450b6375bdde205f5360dd9527fe73bc0eee3fe54
7
- data.tar.gz: aeb79e0395c29242acfddd25e3f86d37bba361b09abf93999f6e2058a7a13b2a87b97c92a026a771f2bdd06f85337f15278c8ddf6e518bf08c1e182a00c5f257
6
+ metadata.gz: 6160cc8a840e2f17aca2ec2b081b98996339f4474bec96cd7d1087da1e3028037cbf22000cf4d7cfd04af5ed8ddc887b41855f672376c5d7105de7ac47af3614
7
+ data.tar.gz: 6f2a1732761c6debb139523c84bbed7f04eb800f3ac2bf4bc9d7f1922f458df5618f8584085fcb3227175d5e38f479c7ba58e6177ea88f44142195886554b8a4
@@ -13,37 +13,4 @@
13
13
  *= require_tree .
14
14
  *= require_self
15
15
  */
16
-
17
- .puntopagos {
18
- width: 100%;
19
- margin-top: 10%;
20
- font-family: Arial, Helvetica, sans-serif;
21
- text-align: center;
22
- }
23
-
24
- .puntopagos h2 {
25
- font-size: 30px;
26
- }
27
-
28
- .puntopagos p {
29
- font-size: 16px;
30
- }
31
-
32
- .puntopagos .view {
33
- width: 500px;
34
- margin: auto;
35
- padding: 20px 20px 30px 20px;
36
- }
37
-
38
- .puntopagos .view.success {
39
- color: #565656;
40
- background-color: #e4dddd;
41
- border: solid 1px #ccc5c5;
42
- }
43
-
44
- .puntopagos .view.error {
45
- color: #b94a48;
46
- background-color: #f2dede;
47
- border: solid 1px #eed3d7;
48
- }
49
-
16
+
@@ -23,8 +23,8 @@ class PuntoPagosRails::PaymentFlowGenerator < Rails::Generators::Base
23
23
  end
24
24
 
25
25
  def copy_views
26
- copy_file("success.html.erb", "app/views/#{controller_name}/success.html.erb")
27
- copy_file("error.html.erb", "app/views/#{controller_name}/error.html.erb")
26
+ template("success.html.erb", "app/views/#{controller_name}/success.html.erb")
27
+ template("error.html.erb", "app/views/#{controller_name}/error.html.erb")
28
28
  end
29
29
 
30
30
  def add_routes
@@ -1,5 +1,3 @@
1
- <div class="puntopagos">
2
- <div class="view error">
3
- <h2><%= error_message %></h2>
4
- </div>
5
- </div>
1
+ Error view
2
+
3
+ <%%= @<%= payable %>.errors.messages %>
@@ -1,5 +1,3 @@
1
- <div class="puntopagos">
2
- <div class="view success">
3
- <h2><%= t("punto_pagos_rails.success.title") %></h2>
4
- </div>
5
- </div>
1
+ Success view
2
+
3
+ <%%= @<%= payable %> %>
@@ -2,38 +2,24 @@ class <%= controller_class %> < ApplicationController
2
2
  def create
3
3
  @<%= payable %> = <%= payable_class %>.create!(create_params)
4
4
  srv = PuntoPagosRails::TransactionService.new(@<%= payable %>)
5
-
6
- if srv.create
7
- redirect_to(srv.process_url)
8
- else
9
- render_payment_error_view(srv.error)
10
- end
5
+ srv.create ? redirect_to(srv.process_url) : render(:error)
11
6
  end
12
7
 
13
8
  def notification
14
9
  response = PuntoPagosRails::TransactionService.notificate(params, request.headers)
15
- render(json: response)
10
+ render json: response
16
11
  end
17
12
 
18
13
  def success
19
- @<%= payable %> = <%= payable %>_by_token
14
+ @<%= payable %> = PuntoPagosRails::TransactionService.<%= payable %>_by_token(params)
20
15
  end
21
16
 
22
17
  def error
23
- @<%= payable %> = <%= payable %>_by_token
24
- render_payment_error_view(I18n.t("punto_pagos_rails.errors.invalid_puntopagos_payment"))
18
+ @<%= payable %> = PuntoPagosRails::TransactionService.failed_<%= payable %>_by_token(params)
25
19
  end
26
20
 
27
21
  private
28
22
 
29
- def render_payment_error_view(error_message)
30
- render("error", locals: { error_message: error_message })
31
- end
32
-
33
- def <%= payable %>_by_token
34
- @<%= payable %> ||= <%= payable_class %>.by_token(params[:token])
35
- end
36
-
37
23
  def create_params
38
24
  params.require(:<%= payable %>).permit(:amount)
39
25
  end
@@ -12,12 +12,10 @@ module PuntoPagosRails
12
12
 
13
13
  def create
14
14
  transaction = payable.transactions.create!
15
-
16
- request = PuntoPagos::Request.new
17
- response = request.create(transaction.id.to_s, transaction.amount_to_s, nil)
15
+ response = PuntoPagos::Request.new.create(transaction.id.to_s, transaction.amount_to_s, nil)
18
16
 
19
17
  if !response.success?
20
- payable.errors.add :base, I18n.t("punto_pagos_rails.errors.invalid_puntopagos_response")
18
+ payable.errors.add(:base, I18n.t("punto_pagos_rails.errors.invalid_puntopagos_response"))
21
19
  return false
22
20
  end
23
21
 
@@ -26,10 +24,6 @@ module PuntoPagosRails
26
24
  end
27
25
  end
28
26
 
29
- def error
30
- payable.errors.messages[:base].first
31
- end
32
-
33
27
  private
34
28
 
35
29
  def init_transaction(transaction, token)
@@ -40,7 +34,7 @@ module PuntoPagosRails
40
34
  end
41
35
 
42
36
  if repeated_token?(token)
43
- payable.errors.add :base, I18n.t("punto_pagos_rails.errors.repeated_token_given")
37
+ payable.errors.add(:base, I18n.t("punto_pagos_rails.errors.repeated_token_given"))
44
38
  return false
45
39
  end
46
40
 
@@ -66,6 +60,26 @@ module PuntoPagosRails
66
60
 
67
61
  private
68
62
 
63
+ def method_missing(method, *args, &block)
64
+ if method.to_s.ends_with?("_by_token")
65
+ payable_class = method.to_s.chomp("_by_token")
66
+ failed = payable_class.slice!("failed_") if method.to_s.starts_with?("failed_")
67
+ return payable_by_token(payable_class.classify.constantize, args.first, !!failed)
68
+ end
69
+
70
+ super
71
+ end
72
+
73
+ def payable_by_token(payable_class, params, with_error = false)
74
+ payable = payable_class.by_token(params[:token])
75
+
76
+ if payable && with_error
77
+ payable.errors.add(:base, I18n.t("punto_pagos_rails.errors.invalid_puntopagos_payment"))
78
+ end
79
+
80
+ payable
81
+ end
82
+
69
83
  def processing_transaction(token)
70
84
  transaction = Transaction.find_by_token(token)
71
85
  return unless transaction
@@ -1,3 +1,3 @@
1
1
  module PuntoPagosRails
2
- VERSION = "1.0.2"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -2,38 +2,24 @@ class TransactionsController < ApplicationController
2
2
  def create
3
3
  @ticket = Ticket.create!(create_params)
4
4
  srv = PuntoPagosRails::TransactionService.new(@ticket)
5
-
6
- if srv.create
7
- redirect_to(srv.process_url)
8
- else
9
- render_payment_error_view(srv.error)
10
- end
5
+ srv.create ? redirect_to(srv.process_url) : render(:error)
11
6
  end
12
7
 
13
8
  def notification
14
9
  response = PuntoPagosRails::TransactionService.notificate(params, request.headers)
15
- render(json: response)
10
+ render json: response
16
11
  end
17
12
 
18
13
  def success
19
- @ticket = ticket_by_token
14
+ @ticket = PuntoPagosRails::TransactionService.ticket_by_token(params)
20
15
  end
21
16
 
22
17
  def error
23
- @ticket = ticket_by_token
24
- render_payment_error_view(I18n.t("punto_pagos_rails.errors.invalid_puntopagos_payment"))
18
+ @ticket = PuntoPagosRails::TransactionService.failed_ticket_by_token(params)
25
19
  end
26
20
 
27
21
  private
28
22
 
29
- def render_payment_error_view(error_message)
30
- render(:error, locals: { error_message: error_message })
31
- end
32
-
33
- def ticket_by_token
34
- @ticket ||= Ticket.by_token(params[:token])
35
- end
36
-
37
23
  def create_params
38
24
  params.require(:ticket).permit(:amount)
39
25
  end
@@ -1,6 +1,3 @@
1
- <div class="puntopagos">
2
- <div class="view error">
3
- <h2><%= error_message %></h2>
4
- Error Ticket #<%= @ticket.id %>
5
- </div>
6
- </div>
1
+ Error view
2
+
3
+ <%= @ticket.errors.messages %>
@@ -1,6 +1,3 @@
1
- <div class="puntopagos">
2
- <div class="view success">
3
- <h2><%= t("punto_pagos_rails.success.title") %></h2>
4
- Success Ticket #<%= @ticket.id %>
5
- </div>
6
- </div>
1
+ Success view
2
+
3
+ <%= @ticket %>
Binary file
@@ -6289,3 +6289,199 @@ Processing by TransactionsController#create as HTML
6289
6289
   (0.7ms) commit transaction
6290
6290
  Redirected to https://sandbox.puntopagos.com/transaccion/procesar/O8D52J7W5PPHAHRV
6291
6291
  Completed 302 Found in 2041ms (ActiveRecord: 3.2ms)
6292
+
6293
+
6294
+ Started GET "/" for ::1 at 2016-06-06 16:15:20 -0300
6295
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
6296
+ Processing by HomeController#index as HTML
6297
+ Rendered home/index.html.erb within layouts/application (23.3ms)
6298
+ Completed 200 OK in 238ms (Views: 237.7ms | ActiveRecord: 0.0ms)
6299
+
6300
+
6301
+ Started POST "/transactions/create" for ::1 at 2016-06-06 16:15:23 -0300
6302
+ Processing by TransactionsController#create as HTML
6303
+ Parameters: {"utf8"=>"✓", "authenticity_token"=>"CtG2/DpC449Z8V97WN8nXH2QZYXhDlMfGpdMa5L4Q5tDGpocTvloiSSR2oPikJ89yqsMxz97YjAL4anGGdTz0g==", "ticket"=>{"amount"=>"3333"}, "commit"=>"Pagar!"}
6304
+  (0.1ms) begin transaction
6305
+ SQL (0.8ms) INSERT INTO "tickets" ("amount", "created_at", "updated_at") VALUES (?, ?, ?) [["amount", 3333], ["created_at", "2016-06-06 19:15:23.288522"], ["updated_at", "2016-06-06 19:15:23.288522"]]
6306
+  (0.5ms) commit transaction
6307
+  (0.1ms) begin transaction
6308
+ SQL (0.7ms) INSERT INTO "punto_pagos_rails_transactions" ("payable_id", "payable_type", "state", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["payable_id", 6], ["payable_type", "Ticket"], ["state", "pending"], ["created_at", "2016-06-06 19:15:23.344051"], ["updated_at", "2016-06-06 19:15:23.344051"]]
6309
+  (0.5ms) commit transaction
6310
+ Ticket Load (0.2ms) SELECT "tickets".* FROM "tickets" WHERE "tickets"."id" = ? LIMIT 1 [["id", 6]]
6311
+  (0.2ms) SELECT COUNT(*) FROM "punto_pagos_rails_transactions" WHERE "punto_pagos_rails_transactions"."token" = ? [["token", "O8D6XL4KB3PU533E"]]
6312
+  (0.1ms) begin transaction
6313
+ SQL (0.3ms) UPDATE "punto_pagos_rails_transactions" SET "token" = ?, "amount" = ?, "updated_at" = ? WHERE "punto_pagos_rails_transactions"."id" = ? [["token", "O8D6XL4KB3PU533E"], ["amount", 3333], ["updated_at", "2016-06-06 19:15:26.157308"], ["id", 6]]
6314
+  (0.5ms) commit transaction
6315
+ Redirected to https://sandbox.puntopagos.com/transaccion/procesar/O8D6XL4KB3PU533E
6316
+ Completed 302 Found in 2882ms (ActiveRecord: 4.5ms)
6317
+
6318
+
6319
+ Started GET "/listings/5/purchases/new" for ::1 at 2016-06-06 16:36:52 -0300
6320
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
6321
+
6322
+ ActionController::RoutingError (No route matches [GET] "/listings/5/purchases/new"):
6323
+ actionpack (4.2.6) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
6324
+ actionpack (4.2.6) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
6325
+ railties (4.2.6) lib/rails/rack/logger.rb:38:in `call_app'
6326
+ railties (4.2.6) lib/rails/rack/logger.rb:20:in `block in call'
6327
+ activesupport (4.2.6) lib/active_support/tagged_logging.rb:68:in `block in tagged'
6328
+ activesupport (4.2.6) lib/active_support/tagged_logging.rb:26:in `tagged'
6329
+ activesupport (4.2.6) lib/active_support/tagged_logging.rb:68:in `tagged'
6330
+ railties (4.2.6) lib/rails/rack/logger.rb:20:in `call'
6331
+ actionpack (4.2.6) lib/action_dispatch/middleware/request_id.rb:21:in `call'
6332
+ rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
6333
+ rack (1.6.4) lib/rack/runtime.rb:18:in `call'
6334
+ activesupport (4.2.6) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
6335
+ rack (1.6.4) lib/rack/lock.rb:17:in `call'
6336
+ actionpack (4.2.6) lib/action_dispatch/middleware/static.rb:120:in `call'
6337
+ rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
6338
+ railties (4.2.6) lib/rails/engine.rb:518:in `call'
6339
+ railties (4.2.6) lib/rails/application.rb:165:in `call'
6340
+ rack (1.6.4) lib/rack/lock.rb:17:in `call'
6341
+ rack (1.6.4) lib/rack/content_length.rb:15:in `call'
6342
+ rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service'
6343
+ /opt/boxen/rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:140:in `service'
6344
+ /opt/boxen/rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:96:in `run'
6345
+ /opt/boxen/rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/server.rb:296:in `block in start_thread'
6346
+
6347
+
6348
+ Rendered /opt/boxen/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms)
6349
+ Rendered /opt/boxen/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/routes/_route.html.erb (1.4ms)
6350
+ Rendered /opt/boxen/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/routes/_table.html.erb (13.6ms)
6351
+ Rendered /opt/boxen/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (10.9ms)
6352
+ Rendered /opt/boxen/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (87.8ms)
6353
+
6354
+
6355
+ Started GET "/" for ::1 at 2016-06-06 16:36:54 -0300
6356
+ Processing by HomeController#index as HTML
6357
+ Rendered home/index.html.erb within layouts/application (2.4ms)
6358
+ Completed 200 OK in 156ms (Views: 155.7ms | ActiveRecord: 0.0ms)
6359
+
6360
+
6361
+ Started GET "/" for ::1 at 2016-06-06 16:37:00 -0300
6362
+ Processing by HomeController#index as HTML
6363
+ Rendered home/index.html.erb within layouts/application (0.7ms)
6364
+ Completed 200 OK in 7ms (Views: 6.8ms | ActiveRecord: 0.0ms)
6365
+
6366
+
6367
+ Started GET "/assets/application.self-565a90fd247bd9ef75cf5f71be1e11e37c3ad80695d8bdfb331fe844afbe0a9e.css?body=1" for ::1 at 2016-06-06 16:37:01 -0300
6368
+
6369
+
6370
+ Started GET "/assets/application.self-de3615060568b463d43b07d97e54e44d624bb66c323372bf19f0d7cab7415efb.js?body=1" for ::1 at 2016-06-06 16:37:01 -0300
6371
+
6372
+
6373
+ Started POST "/transactions/create" for ::1 at 2016-06-06 16:37:03 -0300
6374
+ Processing by TransactionsController#create as HTML
6375
+ Parameters: {"utf8"=>"✓", "authenticity_token"=>"kmKTxNaMXP/+0d7mFRORcK1wVs1HuYBPMIp4F2VBEKXbqb8kojfX+YOxWx6vXCkRGks/j5nMsWAh/J267m2g7A==", "ticket"=>{"amount"=>"22222"}, "commit"=>"Pagar!"}
6376
+  (0.1ms) begin transaction
6377
+ SQL (0.9ms) INSERT INTO "tickets" ("amount", "created_at", "updated_at") VALUES (?, ?, ?) [["amount", 22222], ["created_at", "2016-06-06 19:37:03.295771"], ["updated_at", "2016-06-06 19:37:03.295771"]]
6378
+  (0.6ms) commit transaction
6379
+  (0.0ms) begin transaction
6380
+ SQL (0.9ms) INSERT INTO "punto_pagos_rails_transactions" ("payable_id", "payable_type", "state", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["payable_id", 7], ["payable_type", "Ticket"], ["state", "pending"], ["created_at", "2016-06-06 19:37:03.357037"], ["updated_at", "2016-06-06 19:37:03.357037"]]
6381
+  (0.6ms) commit transaction
6382
+ Ticket Load (0.2ms) SELECT "tickets".* FROM "tickets" WHERE "tickets"."id" = ? LIMIT 1 [["id", 7]]
6383
+ Rendered transactions/error.html.erb within layouts/application (0.5ms)
6384
+ Completed 200 OK in 7223ms (Views: 9.6ms | ActiveRecord: 3.7ms)
6385
+
6386
+
6387
+ Started POST "/transactions/create" for ::1 at 2016-06-06 16:37:21 -0300
6388
+ Processing by TransactionsController#create as HTML
6389
+ Parameters: {"utf8"=>"✓", "authenticity_token"=>"kmKTxNaMXP/+0d7mFRORcK1wVs1HuYBPMIp4F2VBEKXbqb8kojfX+YOxWx6vXCkRGks/j5nMsWAh/J267m2g7A==", "ticket"=>{"amount"=>"22222"}, "commit"=>"Pagar!"}
6390
+  (0.1ms) begin transaction
6391
+ SQL (0.2ms) INSERT INTO "tickets" ("amount", "created_at", "updated_at") VALUES (?, ?, ?) [["amount", 22222], ["created_at", "2016-06-06 19:37:21.979439"], ["updated_at", "2016-06-06 19:37:21.979439"]]
6392
+  (1.5ms) commit transaction
6393
+  (0.1ms) begin transaction
6394
+ SQL (0.3ms) INSERT INTO "punto_pagos_rails_transactions" ("payable_id", "payable_type", "state", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["payable_id", 8], ["payable_type", "Ticket"], ["state", "pending"], ["created_at", "2016-06-06 19:37:21.983618"], ["updated_at", "2016-06-06 19:37:21.983618"]]
6395
+  (0.6ms) commit transaction
6396
+ Ticket Load (0.2ms) SELECT "tickets".* FROM "tickets" WHERE "tickets"."id" = ? LIMIT 1 [["id", 8]]
6397
+ Rendered transactions/error.html.erb within layouts/application (0.1ms)
6398
+ Completed 200 OK in 2225ms (Views: 7.1ms | ActiveRecord: 2.9ms)
6399
+
6400
+
6401
+ Started GET "/" for ::1 at 2016-06-06 16:37:32 -0300
6402
+ Processing by HomeController#index as HTML
6403
+ Rendered home/index.html.erb within layouts/application (0.7ms)
6404
+ Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms)
6405
+
6406
+
6407
+ Started GET "/assets/application.self-565a90fd247bd9ef75cf5f71be1e11e37c3ad80695d8bdfb331fe844afbe0a9e.css?body=1" for ::1 at 2016-06-06 16:37:32 -0300
6408
+
6409
+
6410
+ Started GET "/assets/application.self-de3615060568b463d43b07d97e54e44d624bb66c323372bf19f0d7cab7415efb.js?body=1" for ::1 at 2016-06-06 16:37:32 -0300
6411
+
6412
+
6413
+ Started POST "/transactions/create" for ::1 at 2016-06-06 16:37:41 -0300
6414
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
6415
+ Processing by TransactionsController#create as HTML
6416
+ Parameters: {"utf8"=>"✓", "authenticity_token"=>"iRUArFn+eBSfm9Xtfk79tBXxGK+OcLXzryM6EBxoKaHA3ixMLUXzEuL7UBXEAUXVospx7VAFhNy+Vd+9l0SZ6A==", "ticket"=>{"amount"=>"3333"}, "commit"=>"Pagar!"}
6417
+  (0.1ms) begin transaction
6418
+ SQL (0.4ms) INSERT INTO "tickets" ("amount", "created_at", "updated_at") VALUES (?, ?, ?) [["amount", 3333], ["created_at", "2016-06-06 19:37:42.067314"], ["updated_at", "2016-06-06 19:37:42.067314"]]
6419
+  (1.2ms) commit transaction
6420
+  (0.0ms) begin transaction
6421
+ SQL (0.3ms) INSERT INTO "punto_pagos_rails_transactions" ("payable_id", "payable_type", "state", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["payable_id", 9], ["payable_type", "Ticket"], ["state", "pending"], ["created_at", "2016-06-06 19:37:42.134982"], ["updated_at", "2016-06-06 19:37:42.134982"]]
6422
+  (0.6ms) commit transaction
6423
+ Ticket Load (0.3ms) SELECT "tickets".* FROM "tickets" WHERE "tickets"."id" = ? LIMIT 1 [["id", 9]]
6424
+ Rendered transactions/error.html.erb within layouts/application (1.3ms)
6425
+ Completed 200 OK in 2725ms (Views: 184.3ms | ActiveRecord: 3.5ms)
6426
+
6427
+
6428
+ Started POST "/transactions/create" for ::1 at 2016-06-06 16:38:12 -0300
6429
+ Processing by TransactionsController#create as HTML
6430
+ Parameters: {"utf8"=>"✓", "authenticity_token"=>"iRUArFn+eBSfm9Xtfk79tBXxGK+OcLXzryM6EBxoKaHA3ixMLUXzEuL7UBXEAUXVospx7VAFhNy+Vd+9l0SZ6A==", "ticket"=>{"amount"=>"3333"}, "commit"=>"Pagar!"}
6431
+  (0.1ms) begin transaction
6432
+ SQL (0.2ms) INSERT INTO "tickets" ("amount", "created_at", "updated_at") VALUES (?, ?, ?) [["amount", 3333], ["created_at", "2016-06-06 19:38:12.124893"], ["updated_at", "2016-06-06 19:38:12.124893"]]
6433
+  (1.1ms) commit transaction
6434
+  (0.1ms) begin transaction
6435
+ SQL (0.5ms) INSERT INTO "punto_pagos_rails_transactions" ("payable_id", "payable_type", "state", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["payable_id", 10], ["payable_type", "Ticket"], ["state", "pending"], ["created_at", "2016-06-06 19:38:12.128740"], ["updated_at", "2016-06-06 19:38:12.128740"]]
6436
+  (1.2ms) commit transaction
6437
+ Ticket Load (0.1ms) SELECT "tickets".* FROM "tickets" WHERE "tickets"."id" = ? LIMIT 1 [["id", 10]]
6438
+ Rendered transactions/error.html.erb within layouts/application (0.1ms)
6439
+ Completed 200 OK in 2216ms (Views: 6.8ms | ActiveRecord: 3.4ms)
6440
+
6441
+
6442
+ Started POST "/transactions/create" for ::1 at 2016-06-06 16:38:17 -0300
6443
+ Processing by TransactionsController#create as HTML
6444
+ Parameters: {"utf8"=>"✓", "authenticity_token"=>"iRUArFn+eBSfm9Xtfk79tBXxGK+OcLXzryM6EBxoKaHA3ixMLUXzEuL7UBXEAUXVospx7VAFhNy+Vd+9l0SZ6A==", "ticket"=>{"amount"=>"3333"}, "commit"=>"Pagar!"}
6445
+  (0.1ms) begin transaction
6446
+ SQL (0.5ms) INSERT INTO "tickets" ("amount", "created_at", "updated_at") VALUES (?, ?, ?) [["amount", 3333], ["created_at", "2016-06-06 19:38:17.624428"], ["updated_at", "2016-06-06 19:38:17.624428"]]
6447
+  (1.6ms) commit transaction
6448
+  (0.1ms) begin transaction
6449
+ SQL (0.2ms) INSERT INTO "punto_pagos_rails_transactions" ("payable_id", "payable_type", "state", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["payable_id", 11], ["payable_type", "Ticket"], ["state", "pending"], ["created_at", "2016-06-06 19:38:17.629803"], ["updated_at", "2016-06-06 19:38:17.629803"]]
6450
+  (0.7ms) commit transaction
6451
+ Ticket Load (0.1ms) SELECT "tickets".* FROM "tickets" WHERE "tickets"."id" = ? LIMIT 1 [["id", 11]]
6452
+ Rendered transactions/error.html.erb within layouts/application (0.2ms)
6453
+ Completed 200 OK in 2272ms (Views: 12.0ms | ActiveRecord: 3.2ms)
6454
+
6455
+
6456
+ Started GET "/assets/application.self-565a90fd247bd9ef75cf5f71be1e11e37c3ad80695d8bdfb331fe844afbe0a9e.css?body=1" for ::1 at 2016-06-06 16:38:19 -0300
6457
+
6458
+
6459
+ Started GET "/assets/application.self-de3615060568b463d43b07d97e54e44d624bb66c323372bf19f0d7cab7415efb.js?body=1" for ::1 at 2016-06-06 16:38:19 -0300
6460
+
6461
+
6462
+ Started POST "/transactions/create" for ::1 at 2016-06-06 16:38:32 -0300
6463
+ Processing by TransactionsController#create as HTML
6464
+ Parameters: {"utf8"=>"✓", "authenticity_token"=>"iRUArFn+eBSfm9Xtfk79tBXxGK+OcLXzryM6EBxoKaHA3ixMLUXzEuL7UBXEAUXVospx7VAFhNy+Vd+9l0SZ6A==", "ticket"=>{"amount"=>"12121"}, "commit"=>"Pagar!"}
6465
+  (0.1ms) begin transaction
6466
+ SQL (0.2ms) INSERT INTO "tickets" ("amount", "created_at", "updated_at") VALUES (?, ?, ?) [["amount", 12121], ["created_at", "2016-06-06 19:38:32.092478"], ["updated_at", "2016-06-06 19:38:32.092478"]]
6467
+  (1.3ms) commit transaction
6468
+  (0.1ms) begin transaction
6469
+ SQL (0.2ms) INSERT INTO "punto_pagos_rails_transactions" ("payable_id", "payable_type", "state", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["payable_id", 12], ["payable_type", "Ticket"], ["state", "pending"], ["created_at", "2016-06-06 19:38:32.096371"], ["updated_at", "2016-06-06 19:38:32.096371"]]
6470
+  (0.7ms) commit transaction
6471
+ Ticket Load (0.1ms) SELECT "tickets".* FROM "tickets" WHERE "tickets"."id" = ? LIMIT 1 [["id", 12]]
6472
+ Rendered transactions/error.html.erb within layouts/application (0.1ms)
6473
+ Completed 200 OK in 2121ms (Views: 6.1ms | ActiveRecord: 2.7ms)
6474
+
6475
+
6476
+ Started POST "/transactions/create" for ::1 at 2016-06-06 16:43:08 -0300
6477
+ Processing by TransactionsController#create as HTML
6478
+ Parameters: {"utf8"=>"✓", "authenticity_token"=>"iRUArFn+eBSfm9Xtfk79tBXxGK+OcLXzryM6EBxoKaHA3ixMLUXzEuL7UBXEAUXVospx7VAFhNy+Vd+9l0SZ6A==", "ticket"=>{"amount"=>"12121"}, "commit"=>"Pagar!"}
6479
+  (0.1ms) begin transaction
6480
+ SQL (0.3ms) INSERT INTO "tickets" ("amount", "created_at", "updated_at") VALUES (?, ?, ?) [["amount", 12121], ["created_at", "2016-06-06 19:43:08.288849"], ["updated_at", "2016-06-06 19:43:08.288849"]]
6481
+  (1.4ms) commit transaction
6482
+  (0.1ms) begin transaction
6483
+ SQL (0.2ms) INSERT INTO "punto_pagos_rails_transactions" ("payable_id", "payable_type", "state", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["payable_id", 13], ["payable_type", "Ticket"], ["state", "pending"], ["created_at", "2016-06-06 19:43:08.293567"], ["updated_at", "2016-06-06 19:43:08.293567"]]
6484
+  (0.7ms) commit transaction
6485
+ Ticket Load (0.1ms) SELECT "tickets".* FROM "tickets" WHERE "tickets"."id" = ? LIMIT 1 [["id", 13]]
6486
+ Rendered transactions/error.html.erb within layouts/application (0.1ms)
6487
+ Completed 200 OK in 2731ms (Views: 6.7ms | ActiveRecord: 2.8ms)