payola-payments 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODU5OTVkZmMzMGFkYzAxOWZkN2VhZTZjNTAwNWI4N2NlNTZlOTI0Yw==
4
+ ODA0NTAxNDgzNTJmNjBlNThmNGI3YjkzOThhMTEwODMzOTM2OTgzMg==
5
5
  data.tar.gz: !binary |-
6
- MDljODllYWQyOWRiNDMwY2M1MDg1MTMyZGQwNTZjYTBkOTFhOTQ1MA==
6
+ NjVhZjQ4MjJjZTc2MDJiNjkxYjc0MzY2MTFlMTRiZDE2YmQxMTgyOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjcwZDM0YThjNGQyZjA2NzlkYTdhZjFiNjE5M2Y1MzYxMGM3YTczOTIyZWIy
10
- NTJkOTFlZmM1YjUzZDhiNDQ0YzI0OGM3OWNhMTA1YzYwMzhlNjYwYzA2MThm
11
- MjM2ODliYmQ2ZTI3MmZlZDUxYTM1YjE3NjAwOWZhZjA3YjA2NjU=
9
+ MDA3NjFiM2E2ZjAyNGNjZDQ1Nzg0MDQwYTY1N2I2YjlkZDA3YmU5MTJhMGQ1
10
+ Y2Q3MWM4OTM0YzE0ODNkOTAzYjhjOTU4ZjY1NDk1Y2ZiMjA1ZmQ3ODY5YzQy
11
+ YjgxZWM1M2Y4ZmRkMGMzZWQyN2VlODNhYWJjMTU4NDgyMDgyNzQ=
12
12
  data.tar.gz: !binary |-
13
- ZGM4NWRmMmFjMjYzM2IxYjkwNzZiOGIyYzhiZWUyNDQ5NjNhNzY4Y2Q0ZmZh
14
- NjM5MGY0NDNkNzhlMTMzMzI5NTMxZGUyZTRlMjU5NDc4OGRlMWJiZTE0ZDVk
15
- ZTYyYmFhMDczMDJlY2UxZTYxNzU2ZTgzYjZkNDMwZjdiMjg2NDQ=
13
+ MGUyMjM5MjZkMGI1MjY2NWFkMDZmNWUyMmY3OWZjYTlkYTZkYWMwMzhjNGJl
14
+ MWU3Y2YwYjU4ZTJiYjQwNGI1YmRjOWY0MTExYzAzMmUwMzA3YmRiYjhjMGFl
15
+ NDQ3MjM1MWU2YmE3Y2U5YzEzZTgzMGJiMTkyYjRkYzQ3MGUxMTE=
@@ -19,6 +19,7 @@ module Payola
19
19
 
20
20
  mail_params = {
21
21
  to: @sale.email,
22
+ from: Payola.support_email,
22
23
  subject: @product.respond_to?(:receipt_subject) ? @product.receipt_subject(@sale) : 'Purchase Receipt',
23
24
  }
24
25
 
@@ -37,9 +38,14 @@ module Payola
37
38
 
38
39
  mail_params = {
39
40
  to: @sale.email,
41
+ from: Payola.support_email,
40
42
  subject: @product.respond_to?(:refund_subject) ? @product.refund_subject(@sale) : 'Refund Confirmation',
41
43
  }
42
44
 
45
+ if @product.respond_to?(:refund_from_address)
46
+ mail_params[:from] = @product.refund_from_address(@sale)
47
+ end
48
+
43
49
  mail(mail_params)
44
50
  end
45
51
  end
@@ -1,3 +1,3 @@
1
1
  module Payola
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
@@ -32378,3 +32378,1710 @@ Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
32378
32378
   (0.6ms) rollback transaction
32379
32379
   (0.1ms) begin transaction
32380
32380
   (0.1ms) rollback transaction
32381
+  (1.0ms) CREATE TABLE "owners" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) 
32382
+  (0.9ms) CREATE TABLE "payola_affiliates" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "code" varchar(255), "email" varchar(255), "percent" integer, "created_at" datetime, "updated_at" datetime)
32383
+  (0.8ms) CREATE TABLE "payola_coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "code" varchar(255), "percent_off" integer, "created_at" datetime, "updated_at" datetime) 
32384
+  (0.8ms) CREATE TABLE "payola_sales" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255), "guid" varchar(255), "product_id" integer, "product_type" varchar(255), "created_at" datetime, "updated_at" datetime, "state" varchar(255), "stripe_id" varchar(255), "stripe_token" varchar(255), "card_last4" varchar(255), "card_expiration" date, "card_type" varchar(255), "error" text, "amount" integer, "fee_amount" integer, "coupon_id" integer, "opt_in" boolean, "download_count" integer, "affiliate_id" integer, "customer_address" text, "business_address" text, "stripe_customer_id" varchar(255), "currency" varchar(255), "signed_custom_fields" text, "owner_id" integer, "owner_type" varchar(255))
32385
+  (0.2ms) select sqlite_version(*)
32386
+  (1.0ms) CREATE INDEX "index_payola_sales_on_coupon_id" ON "payola_sales" ("coupon_id")
32387
+  (0.1ms)  SELECT sql
32388
+ FROM sqlite_master
32389
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
32390
+ UNION ALL
32391
+ SELECT sql
32392
+ FROM sqlite_temp_master
32393
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
32394
+ 
32395
+  (0.8ms) CREATE INDEX "index_payola_sales_on_email" ON "payola_sales" ("email")
32396
+  (0.1ms)  SELECT sql
32397
+ FROM sqlite_master
32398
+ WHERE name='index_payola_sales_on_email' AND type='index'
32399
+ UNION ALL
32400
+ SELECT sql
32401
+ FROM sqlite_temp_master
32402
+ WHERE name='index_payola_sales_on_email' AND type='index'
32403
+ 
32404
+  (0.1ms) SELECT sql
32405
+ FROM sqlite_master
32406
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
32407
+ UNION ALL
32408
+ SELECT sql
32409
+ FROM sqlite_temp_master
32410
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
32411
+
32412
+  (0.8ms) CREATE INDEX "index_payola_sales_on_guid" ON "payola_sales" ("guid")
32413
+  (0.1ms) SELECT sql
32414
+ FROM sqlite_master
32415
+ WHERE name='index_payola_sales_on_guid' AND type='index'
32416
+ UNION ALL
32417
+ SELECT sql
32418
+ FROM sqlite_temp_master
32419
+ WHERE name='index_payola_sales_on_guid' AND type='index'
32420
+
32421
+  (0.1ms)  SELECT sql
32422
+ FROM sqlite_master
32423
+ WHERE name='index_payola_sales_on_email' AND type='index'
32424
+ UNION ALL
32425
+ SELECT sql
32426
+ FROM sqlite_temp_master
32427
+ WHERE name='index_payola_sales_on_email' AND type='index'
32428
+ 
32429
+  (0.1ms) SELECT sql
32430
+ FROM sqlite_master
32431
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
32432
+ UNION ALL
32433
+ SELECT sql
32434
+ FROM sqlite_temp_master
32435
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
32436
+
32437
+  (0.9ms) CREATE INDEX "index_payola_sales_on_owner_id_and_owner_type" ON "payola_sales" ("owner_id", "owner_type")
32438
+  (0.1ms) SELECT sql
32439
+ FROM sqlite_master
32440
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
32441
+ UNION ALL
32442
+ SELECT sql
32443
+ FROM sqlite_temp_master
32444
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
32445
+
32446
+  (0.1ms)  SELECT sql
32447
+ FROM sqlite_master
32448
+ WHERE name='index_payola_sales_on_guid' AND type='index'
32449
+ UNION ALL
32450
+ SELECT sql
32451
+ FROM sqlite_temp_master
32452
+ WHERE name='index_payola_sales_on_guid' AND type='index'
32453
+ 
32454
+  (0.1ms) SELECT sql
32455
+ FROM sqlite_master
32456
+ WHERE name='index_payola_sales_on_email' AND type='index'
32457
+ UNION ALL
32458
+ SELECT sql
32459
+ FROM sqlite_temp_master
32460
+ WHERE name='index_payola_sales_on_email' AND type='index'
32461
+
32462
+  (0.1ms)  SELECT sql
32463
+ FROM sqlite_master
32464
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
32465
+ UNION ALL
32466
+ SELECT sql
32467
+ FROM sqlite_temp_master
32468
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
32469
+ 
32470
+  (1.2ms) CREATE INDEX "index_payola_sales_on_product" ON "payola_sales" ("product_id", "product_type")
32471
+  (0.1ms)  SELECT sql
32472
+ FROM sqlite_master
32473
+ WHERE name='index_payola_sales_on_product' AND type='index'
32474
+ UNION ALL
32475
+ SELECT sql
32476
+ FROM sqlite_temp_master
32477
+ WHERE name='index_payola_sales_on_product' AND type='index'
32478
+ 
32479
+  (0.1ms) SELECT sql
32480
+ FROM sqlite_master
32481
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
32482
+ UNION ALL
32483
+ SELECT sql
32484
+ FROM sqlite_temp_master
32485
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
32486
+
32487
+  (0.1ms)  SELECT sql
32488
+ FROM sqlite_master
32489
+ WHERE name='index_payola_sales_on_guid' AND type='index'
32490
+ UNION ALL
32491
+ SELECT sql
32492
+ FROM sqlite_temp_master
32493
+ WHERE name='index_payola_sales_on_guid' AND type='index'
32494
+ 
32495
+  (0.1ms) SELECT sql
32496
+ FROM sqlite_master
32497
+ WHERE name='index_payola_sales_on_email' AND type='index'
32498
+ UNION ALL
32499
+ SELECT sql
32500
+ FROM sqlite_temp_master
32501
+ WHERE name='index_payola_sales_on_email' AND type='index'
32502
+
32503
+  (0.1ms)  SELECT sql
32504
+ FROM sqlite_master
32505
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
32506
+ UNION ALL
32507
+ SELECT sql
32508
+ FROM sqlite_temp_master
32509
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
32510
+ 
32511
+  (0.9ms) CREATE INDEX "index_payola_sales_on_stripe_customer_id" ON "payola_sales" ("stripe_customer_id")
32512
+  (0.7ms) CREATE TABLE "payola_stripe_webhooks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "stripe_id" varchar(255), "created_at" datetime, "updated_at" datetime) 
32513
+  (1.0ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "permalink" varchar(255), "price" integer, "created_at" datetime, "updated_at" datetime)
32514
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
32515
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
32516
+  (0.1ms) SELECT version FROM "schema_migrations"
32517
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141029140518')
32518
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20141001230848')
32519
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141001170138')
32520
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141001203541')
32521
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141002013618')
32522
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141002013701')
32523
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141002203725')
32524
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141017233304')
32525
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141026101628')
32526
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141026144800')
32527
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141029135848')
32528
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
32529
+  (0.1ms) begin transaction
32530
+  (0.1ms) rollback transaction
32531
+  (0.1ms) begin transaction
32532
+  (0.1ms) rollback transaction
32533
+  (0.1ms) begin transaction
32534
+  (0.1ms) SAVEPOINT active_record_1
32535
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-1' LIMIT 1
32536
+ SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.613118"], ["name", "Foo"], ["permalink", "foo-1"], ["price", 100], ["updated_at", "2014-11-03 21:31:42.613118"]]
32537
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32538
+  (0.2ms) SAVEPOINT active_record_1
32539
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-2' LIMIT 1
32540
+ SQL (1.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.640546"], ["name", "Foo"], ["permalink", "foo-2"], ["price", 100], ["updated_at", "2014-11-03 21:31:42.640546"]]
32541
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32542
+  (0.1ms) SAVEPOINT active_record_1
32543
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32544
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32545
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '8qiopn' LIMIT 1
32546
+ SQL (0.2ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.692903"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "8qiopn"], ["product_id", 2], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:31:42.692903"]]
32547
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32548
+ Processing by Payola::TransactionsController#status as HTML
32549
+ Parameters: {"guid"=>"8qiopn"}
32550
+ Payola::Sale Load (0.2ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."guid" = '8qiopn' ORDER BY "payola_sales"."id" ASC LIMIT 1
32551
+ Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 0.2ms)
32552
+  (0.6ms) rollback transaction
32553
+  (0.1ms) begin transaction
32554
+  (0.1ms) SAVEPOINT active_record_1
32555
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-3' LIMIT 1
32556
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.710563"], ["name", "Foo"], ["permalink", "foo-3"], ["price", 100], ["updated_at", "2014-11-03 21:31:42.710563"]]
32557
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32558
+ Processing by Payola::TransactionsController#status as HTML
32559
+ Parameters: {"guid"=>"doesnotexist"}
32560
+ Payola::Sale Load (0.2ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."guid" = 'doesnotexist' ORDER BY "payola_sales"."id" ASC LIMIT 1
32561
+ Completed 404 Not Found in 12ms (Views: 10.4ms | ActiveRecord: 0.2ms)
32562
+  (0.4ms) rollback transaction
32563
+  (0.0ms) begin transaction
32564
+  (0.1ms) SAVEPOINT active_record_1
32565
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-4' LIMIT 1
32566
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.729253"], ["name", "Foo"], ["permalink", "foo-4"], ["price", 100], ["updated_at", "2014-11-03 21:31:42.729253"]]
32567
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32568
+ Processing by Payola::TransactionsController#create as HTML
32569
+ Parameters: {"product_class"=>"product", "permalink"=>"foo-4"}
32570
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."permalink" = 'foo-4' LIMIT 1
32571
+ Payola::Coupon Load (0.1ms) SELECT "payola_coupons".* FROM "payola_coupons" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_coupons"."id" ASC LIMIT 1
32572
+ Payola::Affiliate Load (0.1ms) SELECT "payola_affiliates".* FROM "payola_affiliates" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_affiliates"."id" ASC LIMIT 1
32573
+ Completed 200 OK in 11ms (Views: 0.3ms | ActiveRecord: 0.7ms)
32574
+  (0.4ms) rollback transaction
32575
+  (0.1ms) begin transaction
32576
+  (0.1ms) SAVEPOINT active_record_1
32577
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-5' LIMIT 1
32578
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.747388"], ["name", "Foo"], ["permalink", "foo-5"], ["price", 100], ["updated_at", "2014-11-03 21:31:42.747388"]]
32579
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32580
+ Processing by Payola::TransactionsController#create as HTML
32581
+ Parameters: {"product_class"=>"product", "permalink"=>"foo-5"}
32582
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."permalink" = 'foo-5' LIMIT 1
32583
+ Payola::Coupon Load (0.1ms) SELECT "payola_coupons".* FROM "payola_coupons" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_coupons"."id" ASC LIMIT 1
32584
+ Payola::Affiliate Load (0.1ms) SELECT "payola_affiliates".* FROM "payola_affiliates" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_affiliates"."id" ASC LIMIT 1
32585
+ Completed 400 Bad Request in 2ms (Views: 0.2ms | ActiveRecord: 0.3ms)
32586
+  (0.4ms) rollback transaction
32587
+  (0.1ms) begin transaction
32588
+  (0.1ms) SAVEPOINT active_record_1
32589
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-6' LIMIT 1
32590
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.757845"], ["name", "Foo"], ["permalink", "foo-6"], ["price", 100], ["updated_at", "2014-11-03 21:31:42.757845"]]
32591
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32592
+  (0.0ms) SAVEPOINT active_record_1
32593
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-7' LIMIT 1
32594
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.760400"], ["name", "Foo"], ["permalink", "foo-7"], ["price", 100], ["updated_at", "2014-11-03 21:31:42.760400"]]
32595
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32596
+  (0.0ms) SAVEPOINT active_record_1
32597
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32598
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32599
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'q05uuj' LIMIT 1
32600
+ SQL (0.3ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.763629"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "q05uuj"], ["product_id", 2], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:31:42.763629"]]
32601
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32602
+ Processing by Payola::TransactionsController#show as HTML
32603
+ Parameters: {"guid"=>"q05uuj"}
32604
+ Payola::Sale Load (0.2ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."guid" = 'q05uuj' LIMIT 1
32605
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 2]]
32606
+ Redirected to http://test.host/
32607
+ Completed 302 Found in 6ms (ActiveRecord: 0.3ms)
32608
+  (0.6ms) rollback transaction
32609
+  (0.1ms) begin transaction
32610
+  (0.1ms) SAVEPOINT active_record_1
32611
+ Payola::StripeWebhook Exists (0.1ms) SELECT 1 AS one FROM "payola_stripe_webhooks" WHERE "payola_stripe_webhooks"."stripe_id" = 'test_id' LIMIT 1
32612
+ SQL (0.4ms) INSERT INTO "payola_stripe_webhooks" ("created_at", "stripe_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-03 21:31:42.782366"], ["stripe_id", "test_id"], ["updated_at", "2014-11-03 21:31:42.782366"]]
32613
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32614
+ Payola::StripeWebhook Exists (0.1ms) SELECT 1 AS one FROM "payola_stripe_webhooks" WHERE "payola_stripe_webhooks"."stripe_id" = 'test_id' LIMIT 1
32615
+  (0.4ms) rollback transaction
32616
+  (0.1ms) begin transaction
32617
+ Payola::StripeWebhook Exists (0.2ms) SELECT 1 AS one FROM "payola_stripe_webhooks" WHERE "payola_stripe_webhooks"."stripe_id" = 'test_id' LIMIT 1
32618
+  (0.1ms) rollback transaction
32619
+  (0.1ms) begin transaction
32620
+  (0.1ms) rollback transaction
32621
+  (0.1ms) begin transaction
32622
+  (0.1ms) SAVEPOINT active_record_1
32623
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-8' LIMIT 1
32624
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.866547"], ["name", "Foo"], ["permalink", "foo-8"], ["price", 100], ["updated_at", "2014-11-03 21:31:42.866547"]]
32625
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32626
+  (0.1ms) SAVEPOINT active_record_1
32627
+ Payola::Affiliate Exists (0.1ms) SELECT 1 AS one FROM "payola_affiliates" WHERE "payola_affiliates"."code" = 'MyString' LIMIT 1
32628
+ SQL (0.4ms) INSERT INTO "payola_affiliates" ("code", "created_at", "email", "percent", "updated_at") VALUES (?, ?, ?, ?, ?) [["code", "MyString"], ["created_at", "2014-11-03 21:31:42.874856"], ["email", "foo@example.com"], ["percent", 100], ["updated_at", "2014-11-03 21:31:42.874856"]]
32629
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32630
+ Payola::Affiliate Load (0.2ms) SELECT "payola_affiliates".* FROM "payola_affiliates" WHERE "payola_affiliates"."id" = ? LIMIT 1 [["id", 1]]
32631
+  (0.5ms) rollback transaction
32632
+  (0.1ms) begin transaction
32633
+  (0.1ms) SAVEPOINT active_record_1
32634
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-9' LIMIT 1
32635
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.882971"], ["name", "Foo"], ["permalink", "foo-9"], ["price", 100], ["updated_at", "2014-11-03 21:31:42.882971"]]
32636
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32637
+  (0.4ms) rollback transaction
32638
+  (0.1ms) begin transaction
32639
+  (0.1ms) SAVEPOINT active_record_1
32640
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-10' LIMIT 1
32641
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.889238"], ["name", "Foo"], ["permalink", "foo-10"], ["price", 100], ["updated_at", "2014-11-03 21:31:42.889238"]]
32642
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32643
+  (0.1ms) SAVEPOINT active_record_1
32644
+ Payola::Coupon Exists (0.1ms) SELECT 1 AS one FROM "payola_coupons" WHERE "payola_coupons"."code" = 'MyString' LIMIT 1
32645
+ SQL (0.4ms) INSERT INTO "payola_coupons" ("code", "created_at", "percent_off", "updated_at") VALUES (?, ?, ?, ?) [["code", "MyString"], ["created_at", "2014-11-03 21:31:42.897159"], ["percent_off", 1], ["updated_at", "2014-11-03 21:31:42.897159"]]
32646
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32647
+  (0.4ms) rollback transaction
32648
+  (0.1ms) begin transaction
32649
+  (0.1ms) SAVEPOINT active_record_1
32650
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-11' LIMIT 1
32651
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.904408"], ["name", "Foo"], ["permalink", "foo-11"], ["price", 100], ["updated_at", "2014-11-03 21:31:42.904408"]]
32652
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32653
+  (0.1ms) SAVEPOINT active_record_1
32654
+ Payola::Coupon Exists (0.1ms) SELECT 1 AS one FROM "payola_coupons" WHERE "payola_coupons"."code" = 'MyString' LIMIT 1
32655
+ SQL (0.3ms) INSERT INTO "payola_coupons" ("code", "created_at", "percent_off", "updated_at") VALUES (?, ?, ?, ?) [["code", "MyString"], ["created_at", "2014-11-03 21:31:42.907286"], ["percent_off", 1], ["updated_at", "2014-11-03 21:31:42.907286"]]
32656
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32657
+  (0.4ms) rollback transaction
32658
+  (0.1ms) begin transaction
32659
+  (0.0ms) rollback transaction
32660
+  (0.1ms) begin transaction
32661
+  (0.1ms) rollback transaction
32662
+  (0.1ms) begin transaction
32663
+  (0.1ms) rollback transaction
32664
+  (0.0ms) begin transaction
32665
+  (0.0ms) rollback transaction
32666
+  (0.0ms) begin transaction
32667
+  (0.1ms) rollback transaction
32668
+  (0.0ms) begin transaction
32669
+  (0.1ms) rollback transaction
32670
+  (0.0ms) begin transaction
32671
+  (0.0ms) rollback transaction
32672
+  (0.0ms) begin transaction
32673
+  (0.1ms) rollback transaction
32674
+  (0.1ms) begin transaction
32675
+  (0.1ms) rollback transaction
32676
+  (0.0ms) begin transaction
32677
+  (0.1ms) rollback transaction
32678
+  (0.1ms) begin transaction
32679
+  (0.1ms) rollback transaction
32680
+  (0.1ms) begin transaction
32681
+  (0.1ms) rollback transaction
32682
+  (0.1ms) begin transaction
32683
+  (0.1ms) SAVEPOINT active_record_1
32684
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-12' LIMIT 1
32685
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.947307"], ["name", "Foo"], ["permalink", "foo-12"], ["price", 100], ["updated_at", "2014-11-03 21:31:42.947307"]]
32686
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32687
+  (0.1ms) SAVEPOINT active_record_1
32688
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32689
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32690
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'gii8i9' LIMIT 1
32691
+ SQL (0.5ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.951595"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "gii8i9"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:31:42.951595"]]
32692
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32693
+  (0.0ms) SAVEPOINT active_record_1
32694
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'gii8i9' AND "payola_sales"."id" != 1) LIMIT 1
32695
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32696
+  (0.1ms) SAVEPOINT active_record_1
32697
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'gii8i9' AND "payola_sales"."id" != 1) LIMIT 1
32698
+ SQL (0.2ms) UPDATE "payola_sales" SET "card_expiration" = ?, "card_last4" = ?, "card_type" = ?, "fee_amount" = ?, "stripe_customer_id" = ?, "stripe_id" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["card_expiration", "2013-12-01"], ["card_last4", "4242"], ["card_type", "Visa"], ["fee_amount", 0], ["stripe_customer_id", "test_cus_1"], ["stripe_id", "test_ch_3"], ["updated_at", "2014-11-03 21:31:42.959409"]]
32699
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32700
+  (0.0ms) SAVEPOINT active_record_1
32701
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
32702
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32703
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32704
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32705
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32706
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32707
+  (0.6ms) rollback transaction
32708
+  (0.1ms) begin transaction
32709
+  (0.0ms) SAVEPOINT active_record_1
32710
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-13' LIMIT 1
32711
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.967731"], ["name", "Foo"], ["permalink", "foo-13"], ["price", 100], ["updated_at", "2014-11-03 21:31:42.967731"]]
32712
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32713
+  (0.0ms) SAVEPOINT active_record_1
32714
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32715
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32716
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'ms81bk' LIMIT 1
32717
+ SQL (0.4ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.970565"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "ms81bk"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:31:42.970565"]]
32718
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32719
+  (0.0ms) SAVEPOINT active_record_1
32720
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'ms81bk' AND "payola_sales"."id" != 1) LIMIT 1
32721
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32722
+  (0.1ms) SAVEPOINT active_record_1
32723
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'ms81bk' AND "payola_sales"."id" != 1) LIMIT 1
32724
+ SQL (0.1ms) UPDATE "payola_sales" SET "card_expiration" = ?, "card_last4" = ?, "card_type" = ?, "fee_amount" = ?, "stripe_customer_id" = ?, "stripe_id" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["card_expiration", "2013-12-01"], ["card_last4", "4242"], ["card_type", "Visa"], ["fee_amount", 0], ["stripe_customer_id", "test_cus_1"], ["stripe_id", "test_ch_3"], ["updated_at", "2014-11-03 21:31:42.975540"]]
32725
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32726
+  (0.0ms) SAVEPOINT active_record_1
32727
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
32728
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32729
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32730
+  (0.6ms) rollback transaction
32731
+  (0.1ms) begin transaction
32732
+  (0.1ms) SAVEPOINT active_record_1
32733
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-14' LIMIT 1
32734
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.983423"], ["name", "Foo"], ["permalink", "foo-14"], ["price", 100], ["updated_at", "2014-11-03 21:31:42.983423"]]
32735
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32736
+  (0.1ms) SAVEPOINT active_record_1
32737
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32738
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32739
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '675kv8' LIMIT 1
32740
+ SQL (0.5ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:42.988477"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "675kv8"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:31:42.988477"]]
32741
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32742
+  (0.1ms) SAVEPOINT active_record_1
32743
+ Payola::Sale Exists (0.2ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = '675kv8' AND "payola_sales"."id" != 1) LIMIT 1
32744
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32745
+  (0.1ms) SAVEPOINT active_record_1
32746
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = '675kv8' AND "payola_sales"."id" != 1) LIMIT 1
32747
+ SQL (0.1ms) UPDATE "payola_sales" SET "card_expiration" = ?, "card_last4" = ?, "card_type" = ?, "fee_amount" = ?, "stripe_customer_id" = ?, "stripe_id" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["card_expiration", "2013-12-01"], ["card_last4", "4242"], ["card_type", "Visa"], ["fee_amount", 0], ["stripe_customer_id", "test_cus_1"], ["stripe_id", "test_ch_3"], ["updated_at", "2014-11-03 21:31:42.995825"]]
32748
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32749
+  (0.0ms) SAVEPOINT active_record_1
32750
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
32751
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32752
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32753
+  (0.6ms) rollback transaction
32754
+  (0.1ms) begin transaction
32755
+  (0.1ms) SAVEPOINT active_record_1
32756
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-15' LIMIT 1
32757
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.004005"], ["name", "Foo"], ["permalink", "foo-15"], ["price", 100], ["updated_at", "2014-11-03 21:31:43.004005"]]
32758
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32759
+  (0.1ms) SAVEPOINT active_record_1
32760
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32761
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32762
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'i034t9' LIMIT 1
32763
+ SQL (0.5ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.008299"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "i034t9"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:31:43.008299"]]
32764
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32765
+  (0.1ms) SAVEPOINT active_record_1
32766
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'i034t9' AND "payola_sales"."id" != 1) LIMIT 1
32767
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32768
+  (0.1ms) SAVEPOINT active_record_1
32769
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'i034t9' AND "payola_sales"."id" != 1) LIMIT 1
32770
+ SQL (0.1ms) UPDATE "payola_sales" SET "error" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["error", "The card was declined"], ["updated_at", "2014-11-03 21:31:43.014132"]]
32771
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32772
+  (0.0ms) SAVEPOINT active_record_1
32773
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'errored' WHERE "payola_sales"."id" = 1
32774
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32775
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32776
+  (0.6ms) rollback transaction
32777
+  (0.1ms) begin transaction
32778
+  (0.1ms) rollback transaction
32779
+  (0.1ms) begin transaction
32780
+  (0.1ms) rollback transaction
32781
+  (0.1ms) begin transaction
32782
+  (0.1ms) rollback transaction
32783
+  (0.1ms) begin transaction
32784
+  (0.1ms) rollback transaction
32785
+  (0.1ms) begin transaction
32786
+  (0.1ms) rollback transaction
32787
+  (0.1ms) begin transaction
32788
+  (0.1ms) rollback transaction
32789
+  (0.1ms) begin transaction
32790
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-17' LIMIT 1
32791
+  (0.1ms) rollback transaction
32792
+  (0.0ms) begin transaction
32793
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-18' LIMIT 1
32794
+  (0.1ms) rollback transaction
32795
+  (0.0ms) begin transaction
32796
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'f' LIMIT 1
32797
+  (0.1ms) rollback transaction
32798
+  (0.1ms) begin transaction
32799
+  (0.0ms) rollback transaction
32800
+  (0.0ms) begin transaction
32801
+  (0.0ms) rollback transaction
32802
+  (0.1ms) begin transaction
32803
+  (0.0ms) rollback transaction
32804
+  (0.1ms) begin transaction
32805
+  (0.1ms) SAVEPOINT active_record_1
32806
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-19' LIMIT 1
32807
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.042380"], ["name", "Foo"], ["permalink", "foo-19"], ["price", 100], ["updated_at", "2014-11-03 21:31:43.042380"]]
32808
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32809
+  (0.0ms) SAVEPOINT active_record_1
32810
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32811
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32812
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'ggj70t' LIMIT 1
32813
+ SQL (0.5ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.046193"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "ggj70t"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:31:43.046193"]]
32814
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32815
+  (0.0ms) SAVEPOINT active_record_1
32816
+ SQL (0.2ms) INSERT INTO "owners" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-03 21:31:43.051938"], ["updated_at", "2014-11-03 21:31:43.051938"]]
32817
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32818
+  (0.0ms) SAVEPOINT active_record_1
32819
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'ggj70t' AND "payola_sales"."id" != 1) LIMIT 1
32820
+ SQL (0.3ms) UPDATE "payola_sales" SET "owner_id" = ?, "owner_type" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["owner_id", 1], ["owner_type", "Owner"], ["updated_at", "2014-11-03 21:31:43.057660"]]
32821
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32822
+  (0.6ms) rollback transaction
32823
+  (0.1ms) begin transaction
32824
+  (0.1ms) SAVEPOINT active_record_1
32825
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-20' LIMIT 1
32826
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.063320"], ["name", "Foo"], ["permalink", "foo-20"], ["price", 100], ["updated_at", "2014-11-03 21:31:43.063320"]]
32827
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32828
+  (0.0ms) SAVEPOINT active_record_1
32829
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32830
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32831
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '6oio0n' LIMIT 1
32832
+ SQL (0.4ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.066242"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "6oio0n"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:31:43.066242"]]
32833
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32834
+  (0.1ms) SAVEPOINT active_record_1
32835
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
32836
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32837
+  (0.5ms) rollback transaction
32838
+  (0.1ms) begin transaction
32839
+  (0.1ms) SAVEPOINT active_record_1
32840
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-21' LIMIT 1
32841
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.073383"], ["name", "Foo"], ["permalink", "foo-21"], ["price", 100], ["updated_at", "2014-11-03 21:31:43.073383"]]
32842
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32843
+  (0.0ms) SAVEPOINT active_record_1
32844
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32845
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32846
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '7680r7' LIMIT 1
32847
+ SQL (0.4ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.076272"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "7680r7"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:31:43.076272"]]
32848
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32849
+  (0.1ms) SAVEPOINT active_record_1
32850
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'errored' WHERE "payola_sales"."id" = 1
32851
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32852
+  (0.5ms) rollback transaction
32853
+  (0.1ms) begin transaction
32854
+  (0.1ms) SAVEPOINT active_record_1
32855
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-22' LIMIT 1
32856
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.082903"], ["name", "Foo"], ["permalink", "foo-22"], ["price", 100], ["updated_at", "2014-11-03 21:31:43.082903"]]
32857
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32858
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32859
+  (0.4ms) rollback transaction
32860
+  (0.0ms) begin transaction
32861
+  (0.0ms) SAVEPOINT active_record_1
32862
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-23' LIMIT 1
32863
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.089072"], ["name", "Foo"], ["permalink", "foo-23"], ["price", 100], ["updated_at", "2014-11-03 21:31:43.089072"]]
32864
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32865
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32866
+  (0.3ms) rollback transaction
32867
+  (0.0ms) begin transaction
32868
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32869
+  (0.1ms) rollback transaction
32870
+  (0.0ms) begin transaction
32871
+  (0.1ms) SAVEPOINT active_record_1
32872
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-24' LIMIT 1
32873
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.098283"], ["name", "Foo"], ["permalink", "foo-24"], ["price", 100], ["updated_at", "2014-11-03 21:31:43.098283"]]
32874
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32875
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32876
+  (0.3ms) rollback transaction
32877
+  (0.1ms) begin transaction
32878
+  (0.1ms) SAVEPOINT active_record_1
32879
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-25' LIMIT 1
32880
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.104035"], ["name", "Foo"], ["permalink", "foo-25"], ["price", 100], ["updated_at", "2014-11-03 21:31:43.104035"]]
32881
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32882
+  (0.0ms) SAVEPOINT active_record_1
32883
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32884
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32885
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'b9kfg2' LIMIT 1
32886
+ SQL (0.4ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.107251"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "b9kfg2"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:31:43.107251"]]
32887
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32888
+  (0.0ms) SAVEPOINT active_record_1
32889
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'b9kfg2' AND "payola_sales"."id" != 1) LIMIT 1
32890
+ SQL (0.1ms) UPDATE "payola_sales" SET "signed_custom_fields" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["signed_custom_fields", "BAh7BkkiCmZpZWxkBjoGRUZJIgp2YWx1ZQY7AEY=--5d721d50404afc54672ec88747e606e4226813b1fdb826dff62844c014ca61fc"], ["updated_at", "2014-11-03 21:31:43.109633"]]
32891
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32892
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32893
+  (0.5ms) rollback transaction
32894
+  (0.1ms) begin transaction
32895
+  (0.1ms) SAVEPOINT active_record_1
32896
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-26' LIMIT 1
32897
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.116730"], ["name", "Foo"], ["permalink", "foo-26"], ["price", 100], ["updated_at", "2014-11-03 21:31:43.116730"]]
32898
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32899
+  (0.0ms) SAVEPOINT active_record_1
32900
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32901
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32902
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'i7l8cc' LIMIT 1
32903
+ SQL (0.5ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.120874"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "i7l8cc"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:31:43.120874"]]
32904
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32905
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'i7l8cc' AND "payola_sales"."id" != 1) LIMIT 1
32906
+  (0.1ms) SAVEPOINT active_record_1
32907
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-27' LIMIT 1
32908
+ SQL (0.1ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.126361"], ["name", "Foo"], ["permalink", "foo-27"], ["price", 100], ["updated_at", "2014-11-03 21:31:43.126361"]]
32909
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32910
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'i7l8cc' LIMIT 1
32911
+  (0.6ms) rollback transaction
32912
+  (0.1ms) begin transaction
32913
+  (0.1ms) SAVEPOINT active_record_1
32914
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-28' LIMIT 1
32915
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.134745"], ["name", "Foo"], ["permalink", "foo-28"], ["price", 100], ["updated_at", "2014-11-03 21:31:43.134745"]]
32916
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32917
+  (0.0ms) SAVEPOINT active_record_1
32918
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32919
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32920
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '9a9h6i' LIMIT 1
32921
+ SQL (0.5ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.138681"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "9a9h6i"], ["product_id", 1], ["product_type", "Product"], ["state", "finished"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:31:43.138681"]]
32922
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32923
+  (0.1ms) SAVEPOINT active_record_1
32924
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'refunded' WHERE "payola_sales"."id" = 1
32925
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32926
+  (0.5ms) rollback transaction
32927
+  (0.1ms) begin transaction
32928
+  (0.1ms) SAVEPOINT active_record_1
32929
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-29' LIMIT 1
32930
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.146768"], ["name", "Foo"], ["permalink", "foo-29"], ["price", 100], ["updated_at", "2014-11-03 21:31:43.146768"]]
32931
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32932
+  (0.0ms) SAVEPOINT active_record_1
32933
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32934
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32935
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'qt7itq' LIMIT 1
32936
+ SQL (0.5ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:31:43.150600"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "qt7itq"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:31:43.150600"]]
32937
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32938
+  (0.0ms) SAVEPOINT active_record_1
32939
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'processing' WHERE "payola_sales"."id" = 1
32940
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32941
+  (0.6ms) rollback transaction
32942
+  (0.1ms) begin transaction
32943
+  (0.1ms) rollback transaction
32944
+  (0.1ms) begin transaction
32945
+  (0.1ms) rollback transaction
32946
+  (0.1ms) begin transaction
32947
+  (0.1ms) rollback transaction
32948
+  (0.2ms) begin transaction
32949
+  (0.2ms) rollback transaction
32950
+  (3.1ms) CREATE TABLE "owners" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) 
32951
+  (0.8ms) CREATE TABLE "payola_affiliates" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "code" varchar(255), "email" varchar(255), "percent" integer, "created_at" datetime, "updated_at" datetime)
32952
+  (0.7ms) CREATE TABLE "payola_coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "code" varchar(255), "percent_off" integer, "created_at" datetime, "updated_at" datetime) 
32953
+  (0.8ms) CREATE TABLE "payola_sales" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255), "guid" varchar(255), "product_id" integer, "product_type" varchar(255), "created_at" datetime, "updated_at" datetime, "state" varchar(255), "stripe_id" varchar(255), "stripe_token" varchar(255), "card_last4" varchar(255), "card_expiration" date, "card_type" varchar(255), "error" text, "amount" integer, "fee_amount" integer, "coupon_id" integer, "opt_in" boolean, "download_count" integer, "affiliate_id" integer, "customer_address" text, "business_address" text, "stripe_customer_id" varchar(255), "currency" varchar(255), "signed_custom_fields" text, "owner_id" integer, "owner_type" varchar(255))
32954
+  (0.2ms) select sqlite_version(*)
32955
+  (1.2ms) CREATE INDEX "index_payola_sales_on_coupon_id" ON "payola_sales" ("coupon_id")
32956
+  (0.1ms)  SELECT sql
32957
+ FROM sqlite_master
32958
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
32959
+ UNION ALL
32960
+ SELECT sql
32961
+ FROM sqlite_temp_master
32962
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
32963
+ 
32964
+  (0.7ms) CREATE INDEX "index_payola_sales_on_email" ON "payola_sales" ("email")
32965
+  (0.1ms)  SELECT sql
32966
+ FROM sqlite_master
32967
+ WHERE name='index_payola_sales_on_email' AND type='index'
32968
+ UNION ALL
32969
+ SELECT sql
32970
+ FROM sqlite_temp_master
32971
+ WHERE name='index_payola_sales_on_email' AND type='index'
32972
+ 
32973
+  (0.1ms) SELECT sql
32974
+ FROM sqlite_master
32975
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
32976
+ UNION ALL
32977
+ SELECT sql
32978
+ FROM sqlite_temp_master
32979
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
32980
+
32981
+  (0.9ms) CREATE INDEX "index_payola_sales_on_guid" ON "payola_sales" ("guid")
32982
+  (0.1ms) SELECT sql
32983
+ FROM sqlite_master
32984
+ WHERE name='index_payola_sales_on_guid' AND type='index'
32985
+ UNION ALL
32986
+ SELECT sql
32987
+ FROM sqlite_temp_master
32988
+ WHERE name='index_payola_sales_on_guid' AND type='index'
32989
+
32990
+  (0.1ms)  SELECT sql
32991
+ FROM sqlite_master
32992
+ WHERE name='index_payola_sales_on_email' AND type='index'
32993
+ UNION ALL
32994
+ SELECT sql
32995
+ FROM sqlite_temp_master
32996
+ WHERE name='index_payola_sales_on_email' AND type='index'
32997
+ 
32998
+  (0.1ms) SELECT sql
32999
+ FROM sqlite_master
33000
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33001
+ UNION ALL
33002
+ SELECT sql
33003
+ FROM sqlite_temp_master
33004
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33005
+
33006
+  (1.0ms) CREATE INDEX "index_payola_sales_on_owner_id_and_owner_type" ON "payola_sales" ("owner_id", "owner_type")
33007
+  (0.1ms) SELECT sql
33008
+ FROM sqlite_master
33009
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
33010
+ UNION ALL
33011
+ SELECT sql
33012
+ FROM sqlite_temp_master
33013
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
33014
+
33015
+  (0.1ms)  SELECT sql
33016
+ FROM sqlite_master
33017
+ WHERE name='index_payola_sales_on_guid' AND type='index'
33018
+ UNION ALL
33019
+ SELECT sql
33020
+ FROM sqlite_temp_master
33021
+ WHERE name='index_payola_sales_on_guid' AND type='index'
33022
+ 
33023
+  (0.1ms) SELECT sql
33024
+ FROM sqlite_master
33025
+ WHERE name='index_payola_sales_on_email' AND type='index'
33026
+ UNION ALL
33027
+ SELECT sql
33028
+ FROM sqlite_temp_master
33029
+ WHERE name='index_payola_sales_on_email' AND type='index'
33030
+
33031
+  (0.1ms)  SELECT sql
33032
+ FROM sqlite_master
33033
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33034
+ UNION ALL
33035
+ SELECT sql
33036
+ FROM sqlite_temp_master
33037
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33038
+ 
33039
+  (0.9ms) CREATE INDEX "index_payola_sales_on_product" ON "payola_sales" ("product_id", "product_type")
33040
+  (0.1ms)  SELECT sql
33041
+ FROM sqlite_master
33042
+ WHERE name='index_payola_sales_on_product' AND type='index'
33043
+ UNION ALL
33044
+ SELECT sql
33045
+ FROM sqlite_temp_master
33046
+ WHERE name='index_payola_sales_on_product' AND type='index'
33047
+ 
33048
+  (0.1ms) SELECT sql
33049
+ FROM sqlite_master
33050
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
33051
+ UNION ALL
33052
+ SELECT sql
33053
+ FROM sqlite_temp_master
33054
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
33055
+
33056
+  (0.1ms)  SELECT sql
33057
+ FROM sqlite_master
33058
+ WHERE name='index_payola_sales_on_guid' AND type='index'
33059
+ UNION ALL
33060
+ SELECT sql
33061
+ FROM sqlite_temp_master
33062
+ WHERE name='index_payola_sales_on_guid' AND type='index'
33063
+ 
33064
+  (0.1ms) SELECT sql
33065
+ FROM sqlite_master
33066
+ WHERE name='index_payola_sales_on_email' AND type='index'
33067
+ UNION ALL
33068
+ SELECT sql
33069
+ FROM sqlite_temp_master
33070
+ WHERE name='index_payola_sales_on_email' AND type='index'
33071
+
33072
+  (0.1ms)  SELECT sql
33073
+ FROM sqlite_master
33074
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33075
+ UNION ALL
33076
+ SELECT sql
33077
+ FROM sqlite_temp_master
33078
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33079
+ 
33080
+  (0.9ms) CREATE INDEX "index_payola_sales_on_stripe_customer_id" ON "payola_sales" ("stripe_customer_id")
33081
+  (0.9ms) CREATE TABLE "payola_stripe_webhooks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "stripe_id" varchar(255), "created_at" datetime, "updated_at" datetime) 
33082
+  (0.9ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "permalink" varchar(255), "price" integer, "created_at" datetime, "updated_at" datetime)
33083
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
33084
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
33085
+  (0.1ms) SELECT version FROM "schema_migrations"
33086
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141029140518')
33087
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141001230848')
33088
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141001170138')
33089
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141001203541')
33090
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141002013618')
33091
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141002013701')
33092
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141002203725')
33093
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20141017233304')
33094
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141026101628')
33095
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141026144800')
33096
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141029135848')
33097
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
33098
+  (0.1ms) begin transaction
33099
+ Payola::StripeWebhook Exists (0.1ms) SELECT 1 AS one FROM "payola_stripe_webhooks" WHERE "payola_stripe_webhooks"."stripe_id" = 'test_id' LIMIT 1
33100
+  (0.1ms) rollback transaction
33101
+  (0.1ms) begin transaction
33102
+  (0.1ms) SAVEPOINT active_record_1
33103
+ Payola::StripeWebhook Exists (0.1ms) SELECT 1 AS one FROM "payola_stripe_webhooks" WHERE "payola_stripe_webhooks"."stripe_id" = 'test_id' LIMIT 1
33104
+ SQL (0.7ms) INSERT INTO "payola_stripe_webhooks" ("created_at", "stripe_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-03 21:32:19.422864"], ["stripe_id", "test_id"], ["updated_at", "2014-11-03 21:32:19.422864"]]
33105
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33106
+ Payola::StripeWebhook Exists (0.1ms) SELECT 1 AS one FROM "payola_stripe_webhooks" WHERE "payola_stripe_webhooks"."stripe_id" = 'test_id' LIMIT 1
33107
+  (0.5ms) rollback transaction
33108
+  (0.1ms) begin transaction
33109
+  (0.1ms) rollback transaction
33110
+  (0.0ms) begin transaction
33111
+  (0.1ms) rollback transaction
33112
+  (0.0ms) begin transaction
33113
+  (0.0ms) rollback transaction
33114
+  (0.0ms) begin transaction
33115
+  (0.0ms) rollback transaction
33116
+  (0.0ms) begin transaction
33117
+  (0.0ms) rollback transaction
33118
+  (0.0ms) begin transaction
33119
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-1' LIMIT 1
33120
+  (0.1ms) rollback transaction
33121
+  (0.0ms) begin transaction
33122
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-2' LIMIT 1
33123
+  (0.0ms) rollback transaction
33124
+  (0.0ms) begin transaction
33125
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'f' LIMIT 1
33126
+  (0.0ms) rollback transaction
33127
+  (0.0ms) begin transaction
33128
+  (0.0ms) rollback transaction
33129
+  (0.0ms) begin transaction
33130
+  (0.0ms) rollback transaction
33131
+  (0.0ms) begin transaction
33132
+  (0.0ms) rollback transaction
33133
+  (0.1ms) begin transaction
33134
+  (0.0ms) rollback transaction
33135
+  (0.0ms) begin transaction
33136
+  (0.0ms) rollback transaction
33137
+  (0.0ms) begin transaction
33138
+  (0.0ms) rollback transaction
33139
+  (0.0ms) begin transaction
33140
+  (0.1ms) rollback transaction
33141
+  (0.0ms) begin transaction
33142
+  (0.0ms) rollback transaction
33143
+  (0.0ms) begin transaction
33144
+  (0.0ms) rollback transaction
33145
+  (0.0ms) begin transaction
33146
+  (0.0ms) rollback transaction
33147
+  (0.0ms) begin transaction
33148
+  (0.0ms) rollback transaction
33149
+  (0.0ms) begin transaction
33150
+  (0.0ms) rollback transaction
33151
+  (0.0ms) begin transaction
33152
+  (0.0ms) rollback transaction
33153
+  (0.0ms) begin transaction
33154
+  (0.0ms) rollback transaction
33155
+  (0.1ms) begin transaction
33156
+  (0.1ms) SAVEPOINT active_record_1
33157
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-4' LIMIT 1
33158
+ SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.539623"], ["name", "Foo"], ["permalink", "foo-4"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.539623"]]
33159
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33160
+  (0.6ms) rollback transaction
33161
+  (0.1ms) begin transaction
33162
+  (0.0ms) SAVEPOINT active_record_1
33163
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-5' LIMIT 1
33164
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.575034"], ["name", "Foo"], ["permalink", "foo-5"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.575034"]]
33165
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33166
+  (0.1ms) SAVEPOINT active_record_1
33167
+ Payola::Affiliate Exists (0.1ms) SELECT 1 AS one FROM "payola_affiliates" WHERE "payola_affiliates"."code" = 'MyString' LIMIT 1
33168
+ SQL (0.9ms) INSERT INTO "payola_affiliates" ("code", "created_at", "email", "percent", "updated_at") VALUES (?, ?, ?, ?, ?) [["code", "MyString"], ["created_at", "2014-11-03 21:32:19.583605"], ["email", "foo@example.com"], ["percent", 100], ["updated_at", "2014-11-03 21:32:19.583605"]]
33169
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33170
+ Payola::Affiliate Load (0.1ms) SELECT "payola_affiliates".* FROM "payola_affiliates" WHERE "payola_affiliates"."id" = ? LIMIT 1 [["id", 1]]
33171
+  (0.5ms) rollback transaction
33172
+  (0.0ms) begin transaction
33173
+  (0.0ms) SAVEPOINT active_record_1
33174
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-6' LIMIT 1
33175
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.593436"], ["name", "Foo"], ["permalink", "foo-6"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.593436"]]
33176
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33177
+  (0.1ms) SAVEPOINT active_record_1
33178
+ Payola::Coupon Exists (0.1ms) SELECT 1 AS one FROM "payola_coupons" WHERE "payola_coupons"."code" = 'MyString' LIMIT 1
33179
+ SQL (0.4ms) INSERT INTO "payola_coupons" ("code", "created_at", "percent_off", "updated_at") VALUES (?, ?, ?, ?) [["code", "MyString"], ["created_at", "2014-11-03 21:32:19.602622"], ["percent_off", 1], ["updated_at", "2014-11-03 21:32:19.602622"]]
33180
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33181
+  (0.4ms) rollback transaction
33182
+  (0.1ms) begin transaction
33183
+  (0.0ms) SAVEPOINT active_record_1
33184
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-7' LIMIT 1
33185
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.608984"], ["name", "Foo"], ["permalink", "foo-7"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.608984"]]
33186
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33187
+  (0.0ms) SAVEPOINT active_record_1
33188
+ Payola::Coupon Exists (0.1ms) SELECT 1 AS one FROM "payola_coupons" WHERE "payola_coupons"."code" = 'MyString' LIMIT 1
33189
+ SQL (0.3ms) INSERT INTO "payola_coupons" ("code", "created_at", "percent_off", "updated_at") VALUES (?, ?, ?, ?) [["code", "MyString"], ["created_at", "2014-11-03 21:32:19.611503"], ["percent_off", 1], ["updated_at", "2014-11-03 21:32:19.611503"]]
33190
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33191
+  (0.4ms) rollback transaction
33192
+  (0.0ms) begin transaction
33193
+  (0.1ms) rollback transaction
33194
+  (0.0ms) begin transaction
33195
+  (0.0ms) SAVEPOINT active_record_1
33196
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-8' LIMIT 1
33197
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.622393"], ["name", "Foo"], ["permalink", "foo-8"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.622393"]]
33198
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33199
+  (0.0ms) SAVEPOINT active_record_1
33200
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33201
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33202
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'ckgc0h' LIMIT 1
33203
+ SQL (0.4ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.625657"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "ckgc0h"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:19.625657"]]
33204
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33205
+  (0.0ms) SAVEPOINT active_record_1
33206
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'ckgc0h' AND "payola_sales"."id" != 1) LIMIT 1
33207
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33208
+  (0.0ms) SAVEPOINT active_record_1
33209
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'ckgc0h' AND "payola_sales"."id" != 1) LIMIT 1
33210
+ SQL (0.2ms) UPDATE "payola_sales" SET "card_expiration" = ?, "card_last4" = ?, "card_type" = ?, "fee_amount" = ?, "stripe_customer_id" = ?, "stripe_id" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["card_expiration", "2013-12-01"], ["card_last4", "4242"], ["card_type", "Visa"], ["fee_amount", 0], ["stripe_customer_id", "test_cus_1"], ["stripe_id", "test_ch_3"], ["updated_at", "2014-11-03 21:32:19.674915"]]
33211
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33212
+  (0.0ms) SAVEPOINT active_record_1
33213
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
33214
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33215
+ Payola::Sale Load (0.2ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33216
+  (0.6ms) rollback transaction
33217
+  (0.1ms) begin transaction
33218
+  (0.0ms) SAVEPOINT active_record_1
33219
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-9' LIMIT 1
33220
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.687875"], ["name", "Foo"], ["permalink", "foo-9"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.687875"]]
33221
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33222
+  (0.0ms) SAVEPOINT active_record_1
33223
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33224
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33225
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'k7mfsf' LIMIT 1
33226
+ SQL (0.3ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.690589"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "k7mfsf"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:19.690589"]]
33227
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33228
+  (0.0ms) SAVEPOINT active_record_1
33229
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'k7mfsf' AND "payola_sales"."id" != 1) LIMIT 1
33230
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33231
+  (0.0ms) SAVEPOINT active_record_1
33232
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'k7mfsf' AND "payola_sales"."id" != 1) LIMIT 1
33233
+ SQL (0.1ms) UPDATE "payola_sales" SET "card_expiration" = ?, "card_last4" = ?, "card_type" = ?, "fee_amount" = ?, "stripe_customer_id" = ?, "stripe_id" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["card_expiration", "2013-12-01"], ["card_last4", "4242"], ["card_type", "Visa"], ["fee_amount", 0], ["stripe_customer_id", "test_cus_1"], ["stripe_id", "test_ch_3"], ["updated_at", "2014-11-03 21:32:19.694487"]]
33234
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33235
+  (0.0ms) SAVEPOINT active_record_1
33236
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
33237
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33238
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33239
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33240
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33241
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33242
+  (0.7ms) rollback transaction
33243
+  (0.0ms) begin transaction
33244
+  (0.0ms) SAVEPOINT active_record_1
33245
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-10' LIMIT 1
33246
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.701081"], ["name", "Foo"], ["permalink", "foo-10"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.701081"]]
33247
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33248
+  (0.0ms) SAVEPOINT active_record_1
33249
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33250
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33251
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'fl8lja' LIMIT 1
33252
+ SQL (0.3ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.703840"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "fl8lja"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:19.703840"]]
33253
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33254
+  (0.0ms) SAVEPOINT active_record_1
33255
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'fl8lja' AND "payola_sales"."id" != 1) LIMIT 1
33256
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33257
+  (0.0ms) SAVEPOINT active_record_1
33258
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'fl8lja' AND "payola_sales"."id" != 1) LIMIT 1
33259
+ SQL (0.1ms) UPDATE "payola_sales" SET "card_expiration" = ?, "card_last4" = ?, "card_type" = ?, "fee_amount" = ?, "stripe_customer_id" = ?, "stripe_id" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["card_expiration", "2013-12-01"], ["card_last4", "4242"], ["card_type", "Visa"], ["fee_amount", 0], ["stripe_customer_id", "test_cus_1"], ["stripe_id", "test_ch_3"], ["updated_at", "2014-11-03 21:32:19.707593"]]
33260
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33261
+  (0.0ms) SAVEPOINT active_record_1
33262
+ SQL (0.2ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
33263
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33264
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33265
+  (0.7ms) rollback transaction
33266
+  (0.0ms) begin transaction
33267
+  (0.0ms) SAVEPOINT active_record_1
33268
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-11' LIMIT 1
33269
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.714902"], ["name", "Foo"], ["permalink", "foo-11"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.714902"]]
33270
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33271
+  (0.0ms) SAVEPOINT active_record_1
33272
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33273
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33274
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'lf92hq' LIMIT 1
33275
+ SQL (0.3ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.717557"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "lf92hq"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:19.717557"]]
33276
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33277
+  (0.0ms) SAVEPOINT active_record_1
33278
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'lf92hq' AND "payola_sales"."id" != 1) LIMIT 1
33279
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33280
+  (0.0ms) SAVEPOINT active_record_1
33281
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'lf92hq' AND "payola_sales"."id" != 1) LIMIT 1
33282
+ SQL (0.1ms) UPDATE "payola_sales" SET "error" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["error", "The card was declined"], ["updated_at", "2014-11-03 21:32:19.721063"]]
33283
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33284
+  (0.0ms) SAVEPOINT active_record_1
33285
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'errored' WHERE "payola_sales"."id" = 1
33286
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33287
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33288
+  (0.6ms) rollback transaction
33289
+  (0.1ms) begin transaction
33290
+  (0.1ms) SAVEPOINT active_record_1
33291
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-12' LIMIT 1
33292
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.728946"], ["name", "Foo"], ["permalink", "foo-12"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.728946"]]
33293
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33294
+ Processing by Payola::TransactionsController#create as HTML
33295
+ Parameters: {"product_class"=>"product", "permalink"=>"foo-12"}
33296
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."permalink" = 'foo-12' LIMIT 1
33297
+ Payola::Coupon Load (0.1ms) SELECT "payola_coupons".* FROM "payola_coupons" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_coupons"."id" ASC LIMIT 1
33298
+ Payola::Affiliate Load (0.1ms) SELECT "payola_affiliates".* FROM "payola_affiliates" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_affiliates"."id" ASC LIMIT 1
33299
+ Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.3ms)
33300
+  (0.4ms) rollback transaction
33301
+  (0.0ms) begin transaction
33302
+  (0.0ms) SAVEPOINT active_record_1
33303
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-13' LIMIT 1
33304
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.743791"], ["name", "Foo"], ["permalink", "foo-13"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.743791"]]
33305
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33306
+ Processing by Payola::TransactionsController#create as HTML
33307
+ Parameters: {"product_class"=>"product", "permalink"=>"foo-13"}
33308
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."permalink" = 'foo-13' LIMIT 1
33309
+ Payola::Coupon Load (0.1ms) SELECT "payola_coupons".* FROM "payola_coupons" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_coupons"."id" ASC LIMIT 1
33310
+ Payola::Affiliate Load (0.1ms) SELECT "payola_affiliates".* FROM "payola_affiliates" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_affiliates"."id" ASC LIMIT 1
33311
+ Completed 400 Bad Request in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms)
33312
+  (0.4ms) rollback transaction
33313
+  (0.1ms) begin transaction
33314
+  (0.1ms) SAVEPOINT active_record_1
33315
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-14' LIMIT 1
33316
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.752765"], ["name", "Foo"], ["permalink", "foo-14"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.752765"]]
33317
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33318
+ Processing by Payola::TransactionsController#status as HTML
33319
+ Parameters: {"guid"=>"doesnotexist"}
33320
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."guid" = 'doesnotexist' ORDER BY "payola_sales"."id" ASC LIMIT 1
33321
+ Completed 404 Not Found in 7ms (Views: 6.0ms | ActiveRecord: 0.1ms)
33322
+  (0.4ms) rollback transaction
33323
+  (0.0ms) begin transaction
33324
+  (0.1ms) SAVEPOINT active_record_1
33325
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-15' LIMIT 1
33326
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.765483"], ["name", "Foo"], ["permalink", "foo-15"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.765483"]]
33327
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33328
+  (0.0ms) SAVEPOINT active_record_1
33329
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-16' LIMIT 1
33330
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.767601"], ["name", "Foo"], ["permalink", "foo-16"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.767601"]]
33331
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33332
+  (0.0ms) SAVEPOINT active_record_1
33333
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33334
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33335
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '22dg13' LIMIT 1
33336
+ SQL (0.2ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.770081"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "22dg13"], ["product_id", 2], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:19.770081"]]
33337
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33338
+ Processing by Payola::TransactionsController#status as HTML
33339
+ Parameters: {"guid"=>"22dg13"}
33340
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."guid" = '22dg13' ORDER BY "payola_sales"."id" ASC LIMIT 1
33341
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
33342
+  (0.6ms) rollback transaction
33343
+  (0.0ms) begin transaction
33344
+  (0.0ms) SAVEPOINT active_record_1
33345
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-17' LIMIT 1
33346
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.776744"], ["name", "Foo"], ["permalink", "foo-17"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.776744"]]
33347
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33348
+  (0.0ms) SAVEPOINT active_record_1
33349
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-18' LIMIT 1
33350
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.779273"], ["name", "Foo"], ["permalink", "foo-18"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.779273"]]
33351
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33352
+  (0.0ms) SAVEPOINT active_record_1
33353
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33354
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33355
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '7ono1u' LIMIT 1
33356
+ SQL (0.1ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.781852"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "7ono1u"], ["product_id", 2], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:19.781852"]]
33357
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33358
+ Processing by Payola::TransactionsController#show as HTML
33359
+ Parameters: {"guid"=>"7ono1u"}
33360
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."guid" = '7ono1u' LIMIT 1
33361
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 2]]
33362
+ Redirected to http://test.host/
33363
+ Completed 302 Found in 2ms (ActiveRecord: 0.2ms)
33364
+  (0.6ms) rollback transaction
33365
+  (0.1ms) begin transaction
33366
+  (0.2ms) rollback transaction
33367
+  (0.1ms) begin transaction
33368
+  (0.1ms) rollback transaction
33369
+  (0.1ms) begin transaction
33370
+  (0.1ms) rollback transaction
33371
+  (0.1ms) begin transaction
33372
+  (0.1ms) rollback transaction
33373
+  (0.1ms) begin transaction
33374
+  (0.1ms) rollback transaction
33375
+  (0.1ms) begin transaction
33376
+  (0.1ms) rollback transaction
33377
+  (0.1ms) begin transaction
33378
+  (0.1ms) rollback transaction
33379
+  (0.0ms) begin transaction
33380
+  (0.0ms) rollback transaction
33381
+  (0.0ms) begin transaction
33382
+  (0.0ms) SAVEPOINT active_record_1
33383
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-19' LIMIT 1
33384
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.808565"], ["name", "Foo"], ["permalink", "foo-19"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.808565"]]
33385
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33386
+  (0.0ms) SAVEPOINT active_record_1
33387
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33388
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33389
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'et9uvb' LIMIT 1
33390
+ SQL (0.3ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.811204"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "et9uvb"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:19.811204"]]
33391
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33392
+  (0.0ms) SAVEPOINT active_record_1
33393
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'errored' WHERE "payola_sales"."id" = 1
33394
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33395
+  (0.5ms) rollback transaction
33396
+  (0.0ms) begin transaction
33397
+  (0.0ms) SAVEPOINT active_record_1
33398
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-20' LIMIT 1
33399
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.817112"], ["name", "Foo"], ["permalink", "foo-20"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.817112"]]
33400
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33401
+  (0.0ms) SAVEPOINT active_record_1
33402
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33403
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33404
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'jkr6pq' LIMIT 1
33405
+ SQL (0.5ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.819681"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "jkr6pq"], ["product_id", 1], ["product_type", "Product"], ["state", "finished"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:19.819681"]]
33406
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33407
+  (0.1ms) SAVEPOINT active_record_1
33408
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'refunded' WHERE "payola_sales"."id" = 1
33409
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33410
+  (0.6ms) rollback transaction
33411
+  (0.0ms) begin transaction
33412
+  (0.0ms) SAVEPOINT active_record_1
33413
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-21' LIMIT 1
33414
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.825966"], ["name", "Foo"], ["permalink", "foo-21"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.825966"]]
33415
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33416
+  (0.0ms) SAVEPOINT active_record_1
33417
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33418
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33419
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '1qkrli' LIMIT 1
33420
+ SQL (0.3ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.828652"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "1qkrli"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:19.828652"]]
33421
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33422
+  (0.0ms) SAVEPOINT active_record_1
33423
+ SQL (0.1ms) INSERT INTO "owners" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-03 21:32:19.832496"], ["updated_at", "2014-11-03 21:32:19.832496"]]
33424
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33425
+  (0.0ms) SAVEPOINT active_record_1
33426
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = '1qkrli' AND "payola_sales"."id" != 1) LIMIT 1
33427
+ SQL (0.1ms) UPDATE "payola_sales" SET "owner_id" = ?, "owner_type" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["owner_id", 1], ["owner_type", "Owner"], ["updated_at", "2014-11-03 21:32:19.836616"]]
33428
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33429
+  (0.6ms) rollback transaction
33430
+  (0.1ms) begin transaction
33431
+  (0.0ms) SAVEPOINT active_record_1
33432
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-22' LIMIT 1
33433
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.840842"], ["name", "Foo"], ["permalink", "foo-22"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.840842"]]
33434
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33435
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33436
+  (0.5ms) rollback transaction
33437
+  (0.1ms) begin transaction
33438
+  (0.1ms) SAVEPOINT active_record_1
33439
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-23' LIMIT 1
33440
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.847213"], ["name", "Foo"], ["permalink", "foo-23"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.847213"]]
33441
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33442
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33443
+  (0.4ms) rollback transaction
33444
+  (0.0ms) begin transaction
33445
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33446
+  (0.1ms) rollback transaction
33447
+  (0.0ms) begin transaction
33448
+  (0.0ms) SAVEPOINT active_record_1
33449
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-24' LIMIT 1
33450
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.857068"], ["name", "Foo"], ["permalink", "foo-24"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.857068"]]
33451
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33452
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33453
+  (0.3ms) rollback transaction
33454
+  (0.1ms) begin transaction
33455
+  (0.1ms) SAVEPOINT active_record_1
33456
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-25' LIMIT 1
33457
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.863856"], ["name", "Foo"], ["permalink", "foo-25"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.863856"]]
33458
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33459
+  (0.0ms) SAVEPOINT active_record_1
33460
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33461
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33462
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'iitud1' LIMIT 1
33463
+ SQL (0.4ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.867135"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "iitud1"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:19.867135"]]
33464
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33465
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'iitud1' AND "payola_sales"."id" != 1) LIMIT 1
33466
+  (0.1ms) SAVEPOINT active_record_1
33467
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-26' LIMIT 1
33468
+ SQL (0.1ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.876040"], ["name", "Foo"], ["permalink", "foo-26"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.876040"]]
33469
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33470
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'iitud1' LIMIT 1
33471
+  (1.0ms) rollback transaction
33472
+  (0.1ms) begin transaction
33473
+  (0.0ms) SAVEPOINT active_record_1
33474
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-27' LIMIT 1
33475
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.930289"], ["name", "Foo"], ["permalink", "foo-27"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.930289"]]
33476
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33477
+  (0.0ms) SAVEPOINT active_record_1
33478
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33479
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33480
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '60amri' LIMIT 1
33481
+ SQL (0.3ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.933121"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "60amri"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:19.933121"]]
33482
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33483
+  (0.0ms) SAVEPOINT active_record_1
33484
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'processing' WHERE "payola_sales"."id" = 1
33485
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33486
+  (0.5ms) rollback transaction
33487
+  (0.0ms) begin transaction
33488
+  (0.1ms) SAVEPOINT active_record_1
33489
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-28' LIMIT 1
33490
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.938804"], ["name", "Foo"], ["permalink", "foo-28"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.938804"]]
33491
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33492
+  (0.0ms) SAVEPOINT active_record_1
33493
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33494
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33495
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'n6mfl5' LIMIT 1
33496
+ SQL (0.3ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.941459"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "n6mfl5"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:19.941459"]]
33497
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33498
+  (0.0ms) SAVEPOINT active_record_1
33499
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
33500
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33501
+  (0.5ms) rollback transaction
33502
+  (0.1ms) begin transaction
33503
+  (0.0ms) SAVEPOINT active_record_1
33504
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-29' LIMIT 1
33505
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.947209"], ["name", "Foo"], ["permalink", "foo-29"], ["price", 100], ["updated_at", "2014-11-03 21:32:19.947209"]]
33506
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33507
+  (0.0ms) SAVEPOINT active_record_1
33508
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33509
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33510
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'lb9c4o' LIMIT 1
33511
+ SQL (0.4ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:19.949833"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "lb9c4o"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:19.949833"]]
33512
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33513
+  (0.1ms) SAVEPOINT active_record_1
33514
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'lb9c4o' AND "payola_sales"."id" != 1) LIMIT 1
33515
+ SQL (0.1ms) UPDATE "payola_sales" SET "signed_custom_fields" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["signed_custom_fields", "BAh7BkkiCmZpZWxkBjoGRUZJIgp2YWx1ZQY7AEY=--5d721d50404afc54672ec88747e606e4226813b1fdb826dff62844c014ca61fc"], ["updated_at", "2014-11-03 21:32:19.953245"]]
33516
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33517
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33518
+  (0.5ms) rollback transaction
33519
+  (1.2ms) CREATE TABLE "owners" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) 
33520
+  (1.0ms) CREATE TABLE "payola_affiliates" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "code" varchar(255), "email" varchar(255), "percent" integer, "created_at" datetime, "updated_at" datetime)
33521
+  (1.1ms) CREATE TABLE "payola_coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "code" varchar(255), "percent_off" integer, "created_at" datetime, "updated_at" datetime) 
33522
+  (1.1ms) CREATE TABLE "payola_sales" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255), "guid" varchar(255), "product_id" integer, "product_type" varchar(255), "created_at" datetime, "updated_at" datetime, "state" varchar(255), "stripe_id" varchar(255), "stripe_token" varchar(255), "card_last4" varchar(255), "card_expiration" date, "card_type" varchar(255), "error" text, "amount" integer, "fee_amount" integer, "coupon_id" integer, "opt_in" boolean, "download_count" integer, "affiliate_id" integer, "customer_address" text, "business_address" text, "stripe_customer_id" varchar(255), "currency" varchar(255), "signed_custom_fields" text, "owner_id" integer, "owner_type" varchar(255))
33523
+  (0.2ms) select sqlite_version(*)
33524
+  (1.0ms) CREATE INDEX "index_payola_sales_on_coupon_id" ON "payola_sales" ("coupon_id")
33525
+  (0.1ms)  SELECT sql
33526
+ FROM sqlite_master
33527
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33528
+ UNION ALL
33529
+ SELECT sql
33530
+ FROM sqlite_temp_master
33531
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33532
+ 
33533
+  (0.8ms) CREATE INDEX "index_payola_sales_on_email" ON "payola_sales" ("email")
33534
+  (0.1ms)  SELECT sql
33535
+ FROM sqlite_master
33536
+ WHERE name='index_payola_sales_on_email' AND type='index'
33537
+ UNION ALL
33538
+ SELECT sql
33539
+ FROM sqlite_temp_master
33540
+ WHERE name='index_payola_sales_on_email' AND type='index'
33541
+ 
33542
+  (0.1ms) SELECT sql
33543
+ FROM sqlite_master
33544
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33545
+ UNION ALL
33546
+ SELECT sql
33547
+ FROM sqlite_temp_master
33548
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33549
+
33550
+  (0.7ms) CREATE INDEX "index_payola_sales_on_guid" ON "payola_sales" ("guid")
33551
+  (0.1ms) SELECT sql
33552
+ FROM sqlite_master
33553
+ WHERE name='index_payola_sales_on_guid' AND type='index'
33554
+ UNION ALL
33555
+ SELECT sql
33556
+ FROM sqlite_temp_master
33557
+ WHERE name='index_payola_sales_on_guid' AND type='index'
33558
+
33559
+  (0.1ms)  SELECT sql
33560
+ FROM sqlite_master
33561
+ WHERE name='index_payola_sales_on_email' AND type='index'
33562
+ UNION ALL
33563
+ SELECT sql
33564
+ FROM sqlite_temp_master
33565
+ WHERE name='index_payola_sales_on_email' AND type='index'
33566
+ 
33567
+  (0.1ms) SELECT sql
33568
+ FROM sqlite_master
33569
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33570
+ UNION ALL
33571
+ SELECT sql
33572
+ FROM sqlite_temp_master
33573
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33574
+
33575
+  (0.8ms) CREATE INDEX "index_payola_sales_on_owner_id_and_owner_type" ON "payola_sales" ("owner_id", "owner_type")
33576
+  (0.1ms) SELECT sql
33577
+ FROM sqlite_master
33578
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
33579
+ UNION ALL
33580
+ SELECT sql
33581
+ FROM sqlite_temp_master
33582
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
33583
+
33584
+  (0.1ms)  SELECT sql
33585
+ FROM sqlite_master
33586
+ WHERE name='index_payola_sales_on_guid' AND type='index'
33587
+ UNION ALL
33588
+ SELECT sql
33589
+ FROM sqlite_temp_master
33590
+ WHERE name='index_payola_sales_on_guid' AND type='index'
33591
+ 
33592
+  (0.1ms) SELECT sql
33593
+ FROM sqlite_master
33594
+ WHERE name='index_payola_sales_on_email' AND type='index'
33595
+ UNION ALL
33596
+ SELECT sql
33597
+ FROM sqlite_temp_master
33598
+ WHERE name='index_payola_sales_on_email' AND type='index'
33599
+
33600
+  (0.1ms)  SELECT sql
33601
+ FROM sqlite_master
33602
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33603
+ UNION ALL
33604
+ SELECT sql
33605
+ FROM sqlite_temp_master
33606
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33607
+ 
33608
+  (0.9ms) CREATE INDEX "index_payola_sales_on_product" ON "payola_sales" ("product_id", "product_type")
33609
+  (0.1ms)  SELECT sql
33610
+ FROM sqlite_master
33611
+ WHERE name='index_payola_sales_on_product' AND type='index'
33612
+ UNION ALL
33613
+ SELECT sql
33614
+ FROM sqlite_temp_master
33615
+ WHERE name='index_payola_sales_on_product' AND type='index'
33616
+ 
33617
+  (0.1ms) SELECT sql
33618
+ FROM sqlite_master
33619
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
33620
+ UNION ALL
33621
+ SELECT sql
33622
+ FROM sqlite_temp_master
33623
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
33624
+
33625
+  (0.1ms)  SELECT sql
33626
+ FROM sqlite_master
33627
+ WHERE name='index_payola_sales_on_guid' AND type='index'
33628
+ UNION ALL
33629
+ SELECT sql
33630
+ FROM sqlite_temp_master
33631
+ WHERE name='index_payola_sales_on_guid' AND type='index'
33632
+ 
33633
+  (0.1ms) SELECT sql
33634
+ FROM sqlite_master
33635
+ WHERE name='index_payola_sales_on_email' AND type='index'
33636
+ UNION ALL
33637
+ SELECT sql
33638
+ FROM sqlite_temp_master
33639
+ WHERE name='index_payola_sales_on_email' AND type='index'
33640
+
33641
+  (0.1ms)  SELECT sql
33642
+ FROM sqlite_master
33643
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33644
+ UNION ALL
33645
+ SELECT sql
33646
+ FROM sqlite_temp_master
33647
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
33648
+ 
33649
+  (0.9ms) CREATE INDEX "index_payola_sales_on_stripe_customer_id" ON "payola_sales" ("stripe_customer_id")
33650
+  (0.7ms) CREATE TABLE "payola_stripe_webhooks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "stripe_id" varchar(255), "created_at" datetime, "updated_at" datetime) 
33651
+  (0.9ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "permalink" varchar(255), "price" integer, "created_at" datetime, "updated_at" datetime)
33652
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
33653
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
33654
+  (0.1ms) SELECT version FROM "schema_migrations"
33655
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141029140518')
33656
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141001230848')
33657
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141001170138')
33658
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141001203541')
33659
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141002013618')
33660
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141002013701')
33661
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141002203725')
33662
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141017233304')
33663
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20141026101628')
33664
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141026144800')
33665
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141029135848')
33666
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
33667
+  (0.1ms) begin transaction
33668
+ Payola::StripeWebhook Exists (0.1ms) SELECT 1 AS one FROM "payola_stripe_webhooks" WHERE "payola_stripe_webhooks"."stripe_id" = 'test_id' LIMIT 1
33669
+  (0.1ms) rollback transaction
33670
+  (0.1ms) begin transaction
33671
+  (0.0ms) SAVEPOINT active_record_1
33672
+ Payola::StripeWebhook Exists (0.1ms) SELECT 1 AS one FROM "payola_stripe_webhooks" WHERE "payola_stripe_webhooks"."stripe_id" = 'test_id' LIMIT 1
33673
+ SQL (0.5ms) INSERT INTO "payola_stripe_webhooks" ("created_at", "stripe_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-03 21:32:47.809769"], ["stripe_id", "test_id"], ["updated_at", "2014-11-03 21:32:47.809769"]]
33674
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33675
+ Payola::StripeWebhook Exists (0.1ms) SELECT 1 AS one FROM "payola_stripe_webhooks" WHERE "payola_stripe_webhooks"."stripe_id" = 'test_id' LIMIT 1
33676
+  (0.5ms) rollback transaction
33677
+  (0.1ms) begin transaction
33678
+  (0.1ms) rollback transaction
33679
+  (0.1ms) begin transaction
33680
+  (0.1ms) rollback transaction
33681
+  (0.1ms) begin transaction
33682
+  (0.1ms) rollback transaction
33683
+  (0.1ms) begin transaction
33684
+  (0.1ms) rollback transaction
33685
+  (0.1ms) begin transaction
33686
+  (0.1ms) rollback transaction
33687
+  (0.1ms) begin transaction
33688
+  (0.1ms) rollback transaction
33689
+  (0.1ms) begin transaction
33690
+  (0.1ms) rollback transaction
33691
+  (0.0ms) begin transaction
33692
+  (0.0ms) rollback transaction
33693
+  (0.0ms) begin transaction
33694
+  (0.1ms) SAVEPOINT active_record_1
33695
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-1' LIMIT 1
33696
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:47.905363"], ["name", "Foo"], ["permalink", "foo-1"], ["price", 100], ["updated_at", "2014-11-03 21:32:47.905363"]]
33697
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33698
+  (0.1ms) SAVEPOINT active_record_1
33699
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33700
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33701
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '2ece48' LIMIT 1
33702
+ SQL (1.1ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:47.917533"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "2ece48"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:47.917533"]]
33703
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33704
+  (0.0ms) SAVEPOINT active_record_1
33705
+ SQL (0.2ms) INSERT INTO "owners" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-03 21:32:47.922147"], ["updated_at", "2014-11-03 21:32:47.922147"]]
33706
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33707
+  (0.0ms) SAVEPOINT active_record_1
33708
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = '2ece48' AND "payola_sales"."id" != 1) LIMIT 1
33709
+ SQL (0.2ms) UPDATE "payola_sales" SET "owner_id" = ?, "owner_type" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["owner_id", 1], ["owner_type", "Owner"], ["updated_at", "2014-11-03 21:32:47.926899"]]
33710
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33711
+  (0.6ms) rollback transaction
33712
+  (0.1ms) begin transaction
33713
+  (0.1ms) SAVEPOINT active_record_1
33714
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-2' LIMIT 1
33715
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:47.933641"], ["name", "Foo"], ["permalink", "foo-2"], ["price", 100], ["updated_at", "2014-11-03 21:32:47.933641"]]
33716
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33717
+  (0.0ms) SAVEPOINT active_record_1
33718
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33719
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33720
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'fvrm5c' LIMIT 1
33721
+ SQL (0.5ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:47.937461"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "fvrm5c"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:47.937461"]]
33722
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33723
+  (0.0ms) SAVEPOINT active_record_1
33724
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'processing' WHERE "payola_sales"."id" = 1
33725
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33726
+  (0.7ms) rollback transaction
33727
+  (0.1ms) begin transaction
33728
+  (0.0ms) SAVEPOINT active_record_1
33729
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-3' LIMIT 1
33730
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:47.949886"], ["name", "Foo"], ["permalink", "foo-3"], ["price", 100], ["updated_at", "2014-11-03 21:32:47.949886"]]
33731
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33732
+  (0.0ms) SAVEPOINT active_record_1
33733
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33734
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33735
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'krh6up' LIMIT 1
33736
+ SQL (0.3ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:47.952570"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "krh6up"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:47.952570"]]
33737
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33738
+  (0.0ms) SAVEPOINT active_record_1
33739
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'errored' WHERE "payola_sales"."id" = 1
33740
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33741
+  (0.7ms) rollback transaction
33742
+  (0.1ms) begin transaction
33743
+  (0.1ms) SAVEPOINT active_record_1
33744
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-4' LIMIT 1
33745
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:47.960391"], ["name", "Foo"], ["permalink", "foo-4"], ["price", 100], ["updated_at", "2014-11-03 21:32:47.960391"]]
33746
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33747
+  (0.1ms) SAVEPOINT active_record_1
33748
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33749
+ Payola::Sale Exists (0.2ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33750
+ Payola::Sale Exists (0.2ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 't3lpks' LIMIT 1
33751
+ SQL (0.3ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:47.967650"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "t3lpks"], ["product_id", 1], ["product_type", "Product"], ["state", "finished"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:47.967650"]]
33752
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33753
+  (0.0ms) SAVEPOINT active_record_1
33754
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'refunded' WHERE "payola_sales"."id" = 1
33755
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33756
+  (0.7ms) rollback transaction
33757
+  (0.1ms) begin transaction
33758
+  (0.1ms) SAVEPOINT active_record_1
33759
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-5' LIMIT 1
33760
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:47.975941"], ["name", "Foo"], ["permalink", "foo-5"], ["price", 100], ["updated_at", "2014-11-03 21:32:47.975941"]]
33761
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33762
+  (0.1ms) SAVEPOINT active_record_1
33763
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33764
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33765
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'k1c8hf' LIMIT 1
33766
+ SQL (0.5ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:47.980228"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "k1c8hf"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:47.980228"]]
33767
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33768
+  (0.1ms) SAVEPOINT active_record_1
33769
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
33770
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33771
+  (0.6ms) rollback transaction
33772
+  (0.1ms) begin transaction
33773
+  (0.0ms) SAVEPOINT active_record_1
33774
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-6' LIMIT 1
33775
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:47.987668"], ["name", "Foo"], ["permalink", "foo-6"], ["price", 100], ["updated_at", "2014-11-03 21:32:47.987668"]]
33776
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33777
+  (0.0ms) SAVEPOINT active_record_1
33778
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33779
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33780
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'kehl2t' LIMIT 1
33781
+ SQL (0.3ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:47.990598"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "kehl2t"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:47.990598"]]
33782
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33783
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'kehl2t' AND "payola_sales"."id" != 1) LIMIT 1
33784
+  (0.0ms) SAVEPOINT active_record_1
33785
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-7' LIMIT 1
33786
+ SQL (0.1ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:47.993658"], ["name", "Foo"], ["permalink", "foo-7"], ["price", 100], ["updated_at", "2014-11-03 21:32:47.993658"]]
33787
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33788
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'kehl2t' LIMIT 1
33789
+  (0.5ms) rollback transaction
33790
+  (0.1ms) begin transaction
33791
+  (0.1ms) SAVEPOINT active_record_1
33792
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-8' LIMIT 1
33793
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.000142"], ["name", "Foo"], ["permalink", "foo-8"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.000142"]]
33794
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33795
+  (0.0ms) SAVEPOINT active_record_1
33796
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33797
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33798
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '8s171f' LIMIT 1
33799
+ SQL (0.7ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.003066"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "8s171f"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:48.003066"]]
33800
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33801
+  (0.0ms) SAVEPOINT active_record_1
33802
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = '8s171f' AND "payola_sales"."id" != 1) LIMIT 1
33803
+ SQL (0.1ms) UPDATE "payola_sales" SET "signed_custom_fields" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["signed_custom_fields", "BAh7BkkiCmZpZWxkBjoGRUZJIgp2YWx1ZQY7AEY=--5d721d50404afc54672ec88747e606e4226813b1fdb826dff62844c014ca61fc"], ["updated_at", "2014-11-03 21:32:48.005350"]]
33804
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33805
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33806
+  (0.6ms) rollback transaction
33807
+  (0.0ms) begin transaction
33808
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33809
+  (0.1ms) rollback transaction
33810
+  (0.0ms) begin transaction
33811
+  (0.1ms) SAVEPOINT active_record_1
33812
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-9' LIMIT 1
33813
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.013141"], ["name", "Foo"], ["permalink", "foo-9"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.013141"]]
33814
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33815
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33816
+  (0.4ms) rollback transaction
33817
+  (0.1ms) begin transaction
33818
+  (0.0ms) SAVEPOINT active_record_1
33819
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-10' LIMIT 1
33820
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.061338"], ["name", "Foo"], ["permalink", "foo-10"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.061338"]]
33821
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33822
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33823
+  (0.4ms) rollback transaction
33824
+  (0.0ms) begin transaction
33825
+  (0.0ms) SAVEPOINT active_record_1
33826
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-11' LIMIT 1
33827
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.066267"], ["name", "Foo"], ["permalink", "foo-11"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.066267"]]
33828
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33829
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33830
+  (0.4ms) rollback transaction
33831
+  (0.0ms) begin transaction
33832
+  (0.0ms) rollback transaction
33833
+  (0.0ms) begin transaction
33834
+  (0.0ms) SAVEPOINT active_record_1
33835
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-12' LIMIT 1
33836
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.072161"], ["name", "Foo"], ["permalink", "foo-12"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.072161"]]
33837
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33838
+  (0.0ms) SAVEPOINT active_record_1
33839
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33840
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33841
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'nn3mlj' LIMIT 1
33842
+ SQL (0.3ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.075278"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "nn3mlj"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:48.075278"]]
33843
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33844
+  (0.0ms) SAVEPOINT active_record_1
33845
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'nn3mlj' AND "payola_sales"."id" != 1) LIMIT 1
33846
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33847
+  (0.1ms) SAVEPOINT active_record_1
33848
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'nn3mlj' AND "payola_sales"."id" != 1) LIMIT 1
33849
+ SQL (0.1ms) UPDATE "payola_sales" SET "card_expiration" = ?, "card_last4" = ?, "card_type" = ?, "fee_amount" = ?, "stripe_customer_id" = ?, "stripe_id" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["card_expiration", "2013-12-01"], ["card_last4", "4242"], ["card_type", "Visa"], ["fee_amount", 0], ["stripe_customer_id", "test_cus_1"], ["stripe_id", "test_ch_3"], ["updated_at", "2014-11-03 21:32:48.079311"]]
33850
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33851
+  (0.0ms) SAVEPOINT active_record_1
33852
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
33853
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33854
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33855
+  (0.6ms) rollback transaction
33856
+  (0.1ms) begin transaction
33857
+  (0.0ms) SAVEPOINT active_record_1
33858
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-13' LIMIT 1
33859
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.084853"], ["name", "Foo"], ["permalink", "foo-13"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.084853"]]
33860
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33861
+  (0.0ms) SAVEPOINT active_record_1
33862
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33863
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33864
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'jneja' LIMIT 1
33865
+ SQL (0.3ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.087562"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "jneja"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:48.087562"]]
33866
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33867
+  (0.0ms) SAVEPOINT active_record_1
33868
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'jneja' AND "payola_sales"."id" != 1) LIMIT 1
33869
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33870
+  (0.0ms) SAVEPOINT active_record_1
33871
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'jneja' AND "payola_sales"."id" != 1) LIMIT 1
33872
+ SQL (0.1ms) UPDATE "payola_sales" SET "card_expiration" = ?, "card_last4" = ?, "card_type" = ?, "fee_amount" = ?, "stripe_customer_id" = ?, "stripe_id" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["card_expiration", "2013-12-01"], ["card_last4", "4242"], ["card_type", "Visa"], ["fee_amount", 0], ["stripe_customer_id", "test_cus_1"], ["stripe_id", "test_ch_3"], ["updated_at", "2014-11-03 21:32:48.091557"]]
33873
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33874
+  (0.0ms) SAVEPOINT active_record_1
33875
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
33876
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33877
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33878
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33879
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33880
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33881
+  (0.6ms) rollback transaction
33882
+  (0.0ms) begin transaction
33883
+  (0.1ms) SAVEPOINT active_record_1
33884
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-14' LIMIT 1
33885
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.097983"], ["name", "Foo"], ["permalink", "foo-14"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.097983"]]
33886
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33887
+  (0.1ms) SAVEPOINT active_record_1
33888
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33889
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33890
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'o9f57e' LIMIT 1
33891
+ SQL (0.5ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.102264"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "o9f57e"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:48.102264"]]
33892
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33893
+  (0.1ms) SAVEPOINT active_record_1
33894
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'o9f57e' AND "payola_sales"."id" != 1) LIMIT 1
33895
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33896
+  (0.1ms) SAVEPOINT active_record_1
33897
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'o9f57e' AND "payola_sales"."id" != 1) LIMIT 1
33898
+ SQL (0.1ms) UPDATE "payola_sales" SET "card_expiration" = ?, "card_last4" = ?, "card_type" = ?, "fee_amount" = ?, "stripe_customer_id" = ?, "stripe_id" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["card_expiration", "2013-12-01"], ["card_last4", "4242"], ["card_type", "Visa"], ["fee_amount", 0], ["stripe_customer_id", "test_cus_1"], ["stripe_id", "test_ch_3"], ["updated_at", "2014-11-03 21:32:48.108304"]]
33899
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33900
+  (0.0ms) SAVEPOINT active_record_1
33901
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
33902
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33903
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33904
+  (0.5ms) rollback transaction
33905
+  (0.0ms) begin transaction
33906
+  (0.1ms) SAVEPOINT active_record_1
33907
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-15' LIMIT 1
33908
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.114715"], ["name", "Foo"], ["permalink", "foo-15"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.114715"]]
33909
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33910
+  (0.0ms) SAVEPOINT active_record_1
33911
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33912
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
33913
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'dobt18' LIMIT 1
33914
+ SQL (0.3ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.117504"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "dobt18"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:48.117504"]]
33915
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33916
+  (0.0ms) SAVEPOINT active_record_1
33917
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'dobt18' AND "payola_sales"."id" != 1) LIMIT 1
33918
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33919
+  (0.0ms) SAVEPOINT active_record_1
33920
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'dobt18' AND "payola_sales"."id" != 1) LIMIT 1
33921
+ SQL (0.1ms) UPDATE "payola_sales" SET "error" = ?, "updated_at" = ? WHERE "payola_sales"."id" = 1 [["error", "The card was declined"], ["updated_at", "2014-11-03 21:32:48.121252"]]
33922
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33923
+  (0.0ms) SAVEPOINT active_record_1
33924
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'errored' WHERE "payola_sales"."id" = 1
33925
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33926
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
33927
+  (0.6ms) rollback transaction
33928
+  (0.0ms) begin transaction
33929
+  (0.0ms) rollback transaction
33930
+  (0.0ms) begin transaction
33931
+  (0.0ms) rollback transaction
33932
+  (0.0ms) begin transaction
33933
+  (0.0ms) rollback transaction
33934
+  (0.0ms) begin transaction
33935
+  (0.0ms) rollback transaction
33936
+  (0.0ms) begin transaction
33937
+  (0.0ms) rollback transaction
33938
+  (0.0ms) begin transaction
33939
+  (0.1ms) rollback transaction
33940
+  (0.0ms) begin transaction
33941
+  (0.0ms) SAVEPOINT active_record_1
33942
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-16' LIMIT 1
33943
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.135119"], ["name", "Foo"], ["permalink", "foo-16"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.135119"]]
33944
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33945
+  (0.4ms) rollback transaction
33946
+  (0.0ms) begin transaction
33947
+  (0.0ms) SAVEPOINT active_record_1
33948
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-17' LIMIT 1
33949
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.139157"], ["name", "Foo"], ["permalink", "foo-17"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.139157"]]
33950
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33951
+  (0.0ms) SAVEPOINT active_record_1
33952
+ Payola::Affiliate Exists (0.1ms) SELECT 1 AS one FROM "payola_affiliates" WHERE "payola_affiliates"."code" = 'MyString' LIMIT 1
33953
+ SQL (0.3ms) INSERT INTO "payola_affiliates" ("code", "created_at", "email", "percent", "updated_at") VALUES (?, ?, ?, ?, ?) [["code", "MyString"], ["created_at", "2014-11-03 21:32:48.147538"], ["email", "foo@example.com"], ["percent", 100], ["updated_at", "2014-11-03 21:32:48.147538"]]
33954
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33955
+ Payola::Affiliate Load (0.1ms) SELECT "payola_affiliates".* FROM "payola_affiliates" WHERE "payola_affiliates"."id" = ? LIMIT 1 [["id", 1]]
33956
+  (0.5ms) rollback transaction
33957
+  (0.0ms) begin transaction
33958
+  (0.0ms) SAVEPOINT active_record_1
33959
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-18' LIMIT 1
33960
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.157001"], ["name", "Foo"], ["permalink", "foo-18"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.157001"]]
33961
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33962
+  (0.1ms) SAVEPOINT active_record_1
33963
+ Payola::Coupon Exists (0.1ms) SELECT 1 AS one FROM "payola_coupons" WHERE "payola_coupons"."code" = 'MyString' LIMIT 1
33964
+ SQL (0.4ms) INSERT INTO "payola_coupons" ("code", "created_at", "percent_off", "updated_at") VALUES (?, ?, ?, ?) [["code", "MyString"], ["created_at", "2014-11-03 21:32:48.167330"], ["percent_off", 1], ["updated_at", "2014-11-03 21:32:48.167330"]]
33965
+  (0.1ms) RELEASE SAVEPOINT active_record_1
33966
+  (0.5ms) rollback transaction
33967
+  (0.1ms) begin transaction
33968
+  (0.1ms) SAVEPOINT active_record_1
33969
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-19' LIMIT 1
33970
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.175060"], ["name", "Foo"], ["permalink", "foo-19"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.175060"]]
33971
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33972
+  (0.0ms) SAVEPOINT active_record_1
33973
+ Payola::Coupon Exists (0.1ms) SELECT 1 AS one FROM "payola_coupons" WHERE "payola_coupons"."code" = 'MyString' LIMIT 1
33974
+ SQL (0.2ms) INSERT INTO "payola_coupons" ("code", "created_at", "percent_off", "updated_at") VALUES (?, ?, ?, ?) [["code", "MyString"], ["created_at", "2014-11-03 21:32:48.176836"], ["percent_off", 1], ["updated_at", "2014-11-03 21:32:48.176836"]]
33975
+  (0.0ms) RELEASE SAVEPOINT active_record_1
33976
+  (0.5ms) rollback transaction
33977
+  (0.1ms) begin transaction
33978
+  (0.1ms) rollback transaction
33979
+  (0.0ms) begin transaction
33980
+  (0.0ms) rollback transaction
33981
+  (0.0ms) begin transaction
33982
+  (0.0ms) rollback transaction
33983
+  (0.0ms) begin transaction
33984
+  (0.0ms) rollback transaction
33985
+  (0.0ms) begin transaction
33986
+  (0.0ms) rollback transaction
33987
+  (0.0ms) begin transaction
33988
+  (0.0ms) rollback transaction
33989
+  (0.0ms) begin transaction
33990
+  (0.0ms) rollback transaction
33991
+  (0.0ms) begin transaction
33992
+  (0.0ms) rollback transaction
33993
+  (0.0ms) begin transaction
33994
+  (0.0ms) rollback transaction
33995
+  (0.0ms) begin transaction
33996
+  (0.0ms) rollback transaction
33997
+  (0.1ms) begin transaction
33998
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'f' LIMIT 1
33999
+  (0.1ms) rollback transaction
34000
+  (0.0ms) begin transaction
34001
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-21' LIMIT 1
34002
+  (0.0ms) rollback transaction
34003
+  (0.0ms) begin transaction
34004
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-22' LIMIT 1
34005
+  (0.0ms) rollback transaction
34006
+  (0.1ms) begin transaction
34007
+  (0.1ms) SAVEPOINT active_record_1
34008
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-23' LIMIT 1
34009
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.261637"], ["name", "Foo"], ["permalink", "foo-23"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.261637"]]
34010
+  (0.0ms) RELEASE SAVEPOINT active_record_1
34011
+  (0.0ms) SAVEPOINT active_record_1
34012
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-24' LIMIT 1
34013
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.263720"], ["name", "Foo"], ["permalink", "foo-24"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.263720"]]
34014
+  (0.0ms) RELEASE SAVEPOINT active_record_1
34015
+  (0.0ms) SAVEPOINT active_record_1
34016
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
34017
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
34018
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'f2lv37' LIMIT 1
34019
+ SQL (0.1ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.266200"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "f2lv37"], ["product_id", 2], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:48.266200"]]
34020
+  (0.0ms) RELEASE SAVEPOINT active_record_1
34021
+ Processing by Payola::TransactionsController#show as HTML
34022
+ Parameters: {"guid"=>"f2lv37"}
34023
+ Payola::Sale Load (0.2ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."guid" = 'f2lv37' LIMIT 1
34024
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 2]]
34025
+ Redirected to http://test.host/
34026
+ Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
34027
+  (0.6ms) rollback transaction
34028
+  (0.1ms) begin transaction
34029
+  (0.0ms) SAVEPOINT active_record_1
34030
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-25' LIMIT 1
34031
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.279040"], ["name", "Foo"], ["permalink", "foo-25"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.279040"]]
34032
+  (0.0ms) RELEASE SAVEPOINT active_record_1
34033
+ Processing by Payola::TransactionsController#status as HTML
34034
+ Parameters: {"guid"=>"doesnotexist"}
34035
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."guid" = 'doesnotexist' ORDER BY "payola_sales"."id" ASC LIMIT 1
34036
+ Completed 404 Not Found in 7ms (Views: 6.4ms | ActiveRecord: 0.1ms)
34037
+  (0.5ms) rollback transaction
34038
+  (0.1ms) begin transaction
34039
+  (0.0ms) SAVEPOINT active_record_1
34040
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-26' LIMIT 1
34041
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.292368"], ["name", "Foo"], ["permalink", "foo-26"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.292368"]]
34042
+  (0.0ms) RELEASE SAVEPOINT active_record_1
34043
+  (0.0ms) SAVEPOINT active_record_1
34044
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-27' LIMIT 1
34045
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.294652"], ["name", "Foo"], ["permalink", "foo-27"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.294652"]]
34046
+  (0.0ms) RELEASE SAVEPOINT active_record_1
34047
+  (0.0ms) SAVEPOINT active_record_1
34048
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
34049
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
34050
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'erbas9' LIMIT 1
34051
+ SQL (0.2ms) INSERT INTO "payola_sales" ("created_at", "currency", "email", "guid", "product_id", "product_type", "state", "stripe_token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.297996"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "erbas9"], ["product_id", 2], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:32:48.297996"]]
34052
+  (0.0ms) RELEASE SAVEPOINT active_record_1
34053
+ Processing by Payola::TransactionsController#status as HTML
34054
+ Parameters: {"guid"=>"erbas9"}
34055
+ Payola::Sale Load (0.2ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."guid" = 'erbas9' ORDER BY "payola_sales"."id" ASC LIMIT 1
34056
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
34057
+  (0.7ms) rollback transaction
34058
+  (0.1ms) begin transaction
34059
+  (0.0ms) SAVEPOINT active_record_1
34060
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-28' LIMIT 1
34061
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.306051"], ["name", "Foo"], ["permalink", "foo-28"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.306051"]]
34062
+  (0.0ms) RELEASE SAVEPOINT active_record_1
34063
+ Processing by Payola::TransactionsController#create as HTML
34064
+ Parameters: {"product_class"=>"product", "permalink"=>"foo-28"}
34065
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."permalink" = 'foo-28' LIMIT 1
34066
+ Payola::Coupon Load (0.1ms) SELECT "payola_coupons".* FROM "payola_coupons" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_coupons"."id" ASC LIMIT 1
34067
+ Payola::Affiliate Load (0.1ms) SELECT "payola_affiliates".* FROM "payola_affiliates" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_affiliates"."id" ASC LIMIT 1
34068
+ Completed 200 OK in 4ms (Views: 0.4ms | ActiveRecord: 0.2ms)
34069
+  (0.5ms) rollback transaction
34070
+  (0.0ms) begin transaction
34071
+  (0.0ms) SAVEPOINT active_record_1
34072
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-29' LIMIT 1
34073
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:32:48.317188"], ["name", "Foo"], ["permalink", "foo-29"], ["price", 100], ["updated_at", "2014-11-03 21:32:48.317188"]]
34074
+  (0.0ms) RELEASE SAVEPOINT active_record_1
34075
+ Processing by Payola::TransactionsController#create as HTML
34076
+ Parameters: {"product_class"=>"product", "permalink"=>"foo-29"}
34077
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."permalink" = 'foo-29' LIMIT 1
34078
+ Payola::Coupon Load (0.1ms) SELECT "payola_coupons".* FROM "payola_coupons" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_coupons"."id" ASC LIMIT 1
34079
+ Payola::Affiliate Load (0.1ms) SELECT "payola_affiliates".* FROM "payola_affiliates" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_affiliates"."id" ASC LIMIT 1
34080
+ Completed 400 Bad Request in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms)
34081
+  (0.5ms) rollback transaction
34082
+  (0.0ms) begin transaction
34083
+  (0.2ms) rollback transaction
34084
+  (0.1ms) begin transaction
34085
+  (0.1ms) rollback transaction
34086
+  (0.0ms) begin transaction
34087
+  (0.1ms) rollback transaction