payable 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,22 @@
1
+
2
+
3
+ processaPagtoCredito = function() {
4
+ var settings = {
5
+ "Forma": "CartaoCredito",
6
+ "Instituicao": "Visa",
7
+ "Parcelas": "1",
8
+ "Recebimento": "AVista",
9
+ "CartaoCredito": {
10
+ "Numero": "4073020000000002",
11
+ "Expiracao": "12/15",
12
+ "CodigoSeguranca": "123",
13
+ "Portador": {
14
+ "Nome": "Nome Sobrenome",
15
+ "DataNascimento": "30/12/1987",
16
+ "Telefone": "(11)3165-4020",
17
+ "Identidade": "222.222.222-22"
18
+ }
19
+ }
20
+ }
21
+ MoipWidget(settings);
22
+ }
@@ -5,6 +5,8 @@
5
5
  <%= stylesheet_link_tag "payable/application", :media => "all" %>
6
6
  <%= javascript_include_tag "payable/application" %>
7
7
  <%= csrf_meta_tags %>
8
+ <script type='text/javascript' src='https://desenvolvedor.moip.com.br/sandbox/transparente/MoipWidget-v2.js'></script>
9
+
8
10
  </head>
9
11
  <body>
10
12
 
@@ -29,7 +29,7 @@
29
29
  <label for="security_code">Cód. Segurança</label>: <%= text_field_tag "security_code" %>
30
30
  </p>
31
31
 
32
- <%= button_to_function "Pagar", "alert('pagando')" %>
32
+ <%= button_to_function "Pagar", "alert('pagando');processaPagtoCredito()" %>
33
33
  </fieldset>
34
34
 
35
35
 
@@ -1,3 +1,3 @@
1
1
  module Payable
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -3475,3 +3475,143 @@ Served asset /jquery.js - 304 Not Modified (0ms)
3475
3475
  Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2012-06-08 07:03:26 -0300
3476
3476
  Served asset /jquery_ujs.js - 304 Not Modified (0ms)
3477
3477
  Connecting to database specified by database.yml
3478
+ Connecting to database specified by database.yml
3479
+ Connecting to database specified by database.yml
3480
+
3481
+
3482
+ Started GET "/" for 127.0.0.1 at 2012-06-08 15:50:28 -0300
3483
+
3484
+ ActionController::RoutingError (No route matches [GET] "/"):
3485
+ actionpack (3.2.5) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
3486
+ actionpack (3.2.5) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
3487
+ railties (3.2.5) lib/rails/rack/logger.rb:26:in `call_app'
3488
+ railties (3.2.5) lib/rails/rack/logger.rb:16:in `call'
3489
+ actionpack (3.2.5) lib/action_dispatch/middleware/request_id.rb:22:in `call'
3490
+ rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
3491
+ rack (1.4.1) lib/rack/runtime.rb:17:in `call'
3492
+ activesupport (3.2.5) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
3493
+ rack (1.4.1) lib/rack/lock.rb:15:in `call'
3494
+ actionpack (3.2.5) lib/action_dispatch/middleware/static.rb:62:in `call'
3495
+ railties (3.2.5) lib/rails/engine.rb:479:in `call'
3496
+ railties (3.2.5) lib/rails/application.rb:220:in `call'
3497
+ rack (1.4.1) lib/rack/content_length.rb:14:in `call'
3498
+ railties (3.2.5) lib/rails/rack/log_tailer.rb:17:in `call'
3499
+ rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
3500
+ /Users/targa/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
3501
+ /Users/targa/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
3502
+ /Users/targa/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
3503
+
3504
+
3505
+ Rendered /Users/targa/.rvm/gems/ruby-1.9.2-p290@pinarello/gems/actionpack-3.2.5/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (11.2ms)
3506
+
3507
+
3508
+ Started GET "/payable" for 127.0.0.1 at 2012-06-08 15:50:36 -0300
3509
+ Processing by Payable::WelcomeController#index as HTML
3510
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (bill_status = 'open')
3511
+  (0.1ms) begin transaction
3512
+ SQL (14.7ms) INSERT INTO "orders" ("bill_status", "created_at", "updated_at", "value") VALUES (?, ?, ?, ?) [["bill_status", "open"], ["created_at", Fri, 08 Jun 2012 18:50:36 UTC +00:00], ["updated_at", Fri, 08 Jun 2012 18:50:36 UTC +00:00], ["value", #<BigDecimal:101596a08,'0.87614E2',18(18)>]]
3513
+ SQL (0.4ms) INSERT INTO "payable_gateway_payments" ("config", "created_at", "expires_at", "payable_id", "payable_type", "status", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["config", "--- {}\n\n"], ["created_at", Fri, 08 Jun 2012 18:50:36 UTC +00:00], ["expires_at", nil], ["payable_id", 9], ["payable_type", "Order"], ["status", "open"], ["updated_at", Fri, 08 Jun 2012 18:50:36 UTC +00:00]]
3514
+  (2.8ms) commit transaction
3515
+ Order Load (0.2ms) SELECT "orders".* FROM "orders" ORDER BY id DESC
3516
+ Rendered /Users/targa/Sites/gems/payable/app/views/payable/welcome/index.html.erb within layouts/payable/application (10.7ms)
3517
+ Compiled payable/welcome.js (0ms) (pid 8875)
3518
+ Compiled payable/application.js (11ms) (pid 8875)
3519
+ Completed 200 OK in 472ms (Views: 211.8ms | ActiveRecord: 26.0ms)
3520
+
3521
+
3522
+ Started GET "/assets/payable/application.css?body=1" for 127.0.0.1 at 2012-06-08 15:50:36 -0300
3523
+ Served asset /payable/application.css - 200 OK (3ms)
3524
+
3525
+
3526
+ Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-06-08 15:50:36 -0300
3527
+ Served asset /jquery.js - 200 OK (40ms)
3528
+
3529
+
3530
+ Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2012-06-08 15:50:36 -0300
3531
+ Served asset /jquery_ujs.js - 200 OK (2ms)
3532
+
3533
+
3534
+ Started GET "/assets/payable/welcome.js?body=1" for 127.0.0.1 at 2012-06-08 15:50:36 -0300
3535
+ Served asset /payable/welcome.js - 200 OK (2ms)
3536
+
3537
+
3538
+ Started GET "/assets/payable/application.js?body=1" for 127.0.0.1 at 2012-06-08 15:50:36 -0300
3539
+ Served asset /payable/application.js - 200 OK (6ms)
3540
+
3541
+
3542
+ Started POST "/payable/welcome/checkout?id=9" for 127.0.0.1 at 2012-06-08 15:50:41 -0300
3543
+ Processing by Payable::WelcomeController#checkout as HTML
3544
+ Parameters: {"authenticity_token"=>"5BdXcpKKHnRxj5QpvWCSBYTH5Eqpu8LCXHLendcNI4I=", "id"=>"9"}
3545
+ Order Load (0.2ms) SELECT "orders".* FROM "orders" WHERE "orders"."id" = ? LIMIT 1 [["id", "9"]]
3546
+  (0.1ms) begin transaction
3547
+  (0.2ms) SELECT COUNT(*) FROM "payable_gateway_payments" WHERE "payable_gateway_payments"."payable_id" = 9 AND "payable_gateway_payments"."payable_type" = 'Order'
3548
+ Payable::GatewayPayment Load (0.1ms) SELECT "payable_gateway_payments".* FROM "payable_gateway_payments" WHERE "payable_gateway_payments"."payable_id" = 9 AND "payable_gateway_payments"."payable_type" = 'Order'
3549
+  (0.3ms) UPDATE "orders" SET "bill_status" = 'waiting', "updated_at" = '2012-06-08 18:50:41.647996' WHERE "orders"."id" = 9
3550
+ Payable::GatewayPayment Load (0.2ms) SELECT "payable_gateway_payments".* FROM "payable_gateway_payments" WHERE "payable_gateway_payments"."payable_id" = 9 AND "payable_gateway_payments"."payable_type" = 'Order' AND (status <> 'canceled') LIMIT 1
3551
+ Order Load (0.1ms) SELECT "orders".* FROM "orders" WHERE "orders"."id" = 9 LIMIT 1
3552
+  (0.2ms) UPDATE "payable_gateway_payments" SET "status" = 'waiting', "updated_at" = '2012-06-08 18:50:43.387342', "config" = '---
3553
+ :id: "201206081550432230000000759217"
3554
+ :status: Sucesso
3555
+ :token: B2T0R1D2Q0C6W0J8Q1M5G5W0N4X3T2A2Q3W0N0V0H020I0A0B745O9B2Q1U7
3556
+ ' WHERE "payable_gateway_payments"."id" = 22
3557
+  (0.1ms) UPDATE "payable_gateway_payments" SET "status" = 'waiting', "updated_at" = '2012-06-08 18:50:43.387342', "expires_at" = '2012-06-08 19:05:43.394655', "config" = '---
3558
+ :id: "201206081550432230000000759217"
3559
+ :status: Sucesso
3560
+ :token: B2T0R1D2Q0C6W0J8Q1M5G5W0N4X3T2A2Q3W0N0V0H020I0A0B745O9B2Q1U7
3561
+ ' WHERE "payable_gateway_payments"."id" = 22
3562
+  (1.9ms) commit transaction
3563
+ Redirected to http://localhost:3030/payable/welcome/json_form?id=9
3564
+ Completed 302 Found in 1757ms (ActiveRecord: 3.4ms)
3565
+
3566
+
3567
+ Started POST "/payable/welcome/checkout?id=9" for 127.0.0.1 at 2012-06-08 15:50:43 -0300
3568
+ Processing by Payable::WelcomeController#checkout as HTML
3569
+ Parameters: {"authenticity_token"=>"5BdXcpKKHnRxj5QpvWCSBYTH5Eqpu8LCXHLendcNI4I=", "id"=>"9"}
3570
+ Order Load (0.1ms) SELECT "orders".* FROM "orders" WHERE "orders"."id" = ? LIMIT 1 [["id", "9"]]
3571
+ Redirected to http://localhost:3030/payable/welcome/json_form?id=9
3572
+ Completed 302 Found in 4ms (ActiveRecord: 0.1ms)
3573
+
3574
+
3575
+ Started GET "/payable/welcome/json_form?id=9" for 127.0.0.1 at 2012-06-08 15:50:43 -0300
3576
+ Processing by Payable::WelcomeController#json_form as HTML
3577
+ Parameters: {"id"=>"9"}
3578
+ Order Load (0.2ms) SELECT "orders".* FROM "orders" WHERE "orders"."id" = ? LIMIT 1 [["id", "9"]]
3579
+ Payable::GatewayPayment Load (0.2ms) SELECT "payable_gateway_payments".* FROM "payable_gateway_payments" WHERE "payable_gateway_payments"."payable_id" = 9 AND "payable_gateway_payments"."payable_type" = 'Order' AND (status <> 'canceled') LIMIT 1
3580
+ DEPRECATION WARNING: button_to_function is deprecated and will be removed from Rails 4.0. (called from ___sers_targa__ites_gems_payable_app_views_payable_welcome_json_form_html_erb__4025642982676178153_2170159240 at /Users/targa/Sites/gems/payable/app/views/payable/welcome/json_form.html.erb:32)
3581
+ Rendered /Users/targa/Sites/gems/payable/app/views/payable/welcome/json_form.html.erb within layouts/payable/application (38.3ms)
3582
+ Completed 200 OK in 45ms (Views: 43.1ms | ActiveRecord: 0.4ms)
3583
+
3584
+
3585
+ Started GET "/assets/payable/welcome.js?body=1" for 127.0.0.1 at 2012-06-08 15:50:43 -0300
3586
+ Served asset /payable/welcome.js - 304 Not Modified (0ms)
3587
+ Connecting to database specified by database.yml
3588
+
3589
+
3590
+ Started GET "/payable/welcome/json_form?id=9" for 127.0.0.1 at 2012-06-08 15:51:58 -0300
3591
+ Processing by Payable::WelcomeController#json_form as HTML
3592
+ Parameters: {"id"=>"9"}
3593
+ Order Load (0.3ms) SELECT "orders".* FROM "orders" WHERE "orders"."id" = ? LIMIT 1 [["id", "9"]]
3594
+ Payable::GatewayPayment Load (0.2ms) SELECT "payable_gateway_payments".* FROM "payable_gateway_payments" WHERE "payable_gateway_payments"."payable_id" = 9 AND "payable_gateway_payments"."payable_type" = 'Order' AND (status <> 'canceled') LIMIT 1
3595
+ DEPRECATION WARNING: button_to_function is deprecated and will be removed from Rails 4.0. (called from ___sers_targa__ites_gems_payable_app_views_payable_welcome_json_form_html_erb__71585072362100398_2170252540 at /Users/targa/Sites/gems/payable/app/views/payable/welcome/json_form.html.erb:32)
3596
+ Rendered /Users/targa/Sites/gems/payable/app/views/payable/welcome/json_form.html.erb within layouts/payable/application (116.7ms)
3597
+ Completed 200 OK in 294ms (Views: 174.1ms | ActiveRecord: 8.4ms)
3598
+
3599
+
3600
+ Started GET "/assets/payable/application.css?body=1" for 127.0.0.1 at 2012-06-08 15:51:59 -0300
3601
+ Served asset /payable/application.css - 200 OK (3ms)
3602
+
3603
+
3604
+ Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-06-08 15:51:59 -0300
3605
+ Served asset /jquery.js - 200 OK (4ms)
3606
+
3607
+
3608
+ Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2012-06-08 15:51:59 -0300
3609
+ Served asset /jquery_ujs.js - 200 OK (2ms)
3610
+
3611
+
3612
+ Started GET "/assets/payable/welcome.js?body=1" for 127.0.0.1 at 2012-06-08 15:51:59 -0300
3613
+ Served asset /payable/welcome.js - 200 OK (10ms)
3614
+
3615
+
3616
+ Started GET "/assets/payable/application.js?body=1" for 127.0.0.1 at 2012-06-08 15:51:59 -0300
3617
+ Served asset /payable/application.js - 200 OK (7ms)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: payable
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Pablo Targa
@@ -79,6 +79,7 @@ extra_rdoc_files: []
79
79
 
80
80
  files:
81
81
  - app/assets/javascripts/payable/application.js
82
+ - app/assets/javascripts/payable/welcome.js
82
83
  - app/assets/stylesheets/payable/application.css
83
84
  - app/controllers/payable/application_controller.rb
84
85
  - app/controllers/payable/welcome_controller.rb
@@ -138,6 +139,7 @@ files:
138
139
  - test/dummy/test/unit/helpers/welcome_helper_test.rb
139
140
  - test/dummy/test/unit/order_test.rb
140
141
  - test/dummy/teste.rb
142
+ - test/dummy/tmp/cache/assets/C61/640/sprockets%2Ff69466d6f41179e50506330f9d0c2878
141
143
  - test/dummy/tmp/cache/assets/C7B/190/sprockets%2F37b103f4623089af1456b90830fe941c
142
144
  - test/dummy/tmp/cache/assets/CD5/140/sprockets%2Fa21a126d87fb83916bd0862280727aca
143
145
  - test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
@@ -145,6 +147,7 @@ files:
145
147
  - test/dummy/tmp/cache/assets/D0D/4C0/sprockets%2F3e934303399d3f2cc7a8cf4c450ad254
146
148
  - test/dummy/tmp/cache/assets/D13/C60/sprockets%2F2dedb8177c20286c4259c1d58c5646cc
147
149
  - test/dummy/tmp/cache/assets/D21/5D0/sprockets%2Fe2c4f946939f2d7d0b42d86383755cae
150
+ - test/dummy/tmp/cache/assets/D2E/EE0/sprockets%2F7cdc9b404ba0031eb5721194c22dfe85
148
151
  - test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
149
152
  - test/dummy/tmp/cache/assets/D35/E90/sprockets%2F7447bd893b001d61304c5ac3fe2bb88d
150
153
  - test/dummy/tmp/cache/assets/D3E/F40/sprockets%2F25a167c7563d6fe8ec6b13ec1ac09274
@@ -233,6 +236,7 @@ test_files:
233
236
  - test/dummy/test/unit/helpers/welcome_helper_test.rb
234
237
  - test/dummy/test/unit/order_test.rb
235
238
  - test/dummy/teste.rb
239
+ - test/dummy/tmp/cache/assets/C61/640/sprockets%2Ff69466d6f41179e50506330f9d0c2878
236
240
  - test/dummy/tmp/cache/assets/C7B/190/sprockets%2F37b103f4623089af1456b90830fe941c
237
241
  - test/dummy/tmp/cache/assets/CD5/140/sprockets%2Fa21a126d87fb83916bd0862280727aca
238
242
  - test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
@@ -240,6 +244,7 @@ test_files:
240
244
  - test/dummy/tmp/cache/assets/D0D/4C0/sprockets%2F3e934303399d3f2cc7a8cf4c450ad254
241
245
  - test/dummy/tmp/cache/assets/D13/C60/sprockets%2F2dedb8177c20286c4259c1d58c5646cc
242
246
  - test/dummy/tmp/cache/assets/D21/5D0/sprockets%2Fe2c4f946939f2d7d0b42d86383755cae
247
+ - test/dummy/tmp/cache/assets/D2E/EE0/sprockets%2F7cdc9b404ba0031eb5721194c22dfe85
243
248
  - test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
244
249
  - test/dummy/tmp/cache/assets/D35/E90/sprockets%2F7447bd893b001d61304c5ac3fe2bb88d
245
250
  - test/dummy/tmp/cache/assets/D3E/F40/sprockets%2F25a167c7563d6fe8ec6b13ec1ac09274