payola-payments 1.1.0 → 1.1.1

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
- YzAxOTU3MDMyMWI1YmEyYTA3OWM4ZDY4YzRhODllNzNjMjhhNTczMw==
4
+ ODU5OTVkZmMzMGFkYzAxOWZkN2VhZTZjNTAwNWI4N2NlNTZlOTI0Yw==
5
5
  data.tar.gz: !binary |-
6
- NDhkMWE5YjZkNDE4NjEwMDMyYjkyZDEwZGYzZDAxNmNiYjA0N2RhYQ==
6
+ MDljODllYWQyOWRiNDMwY2M1MDg1MTMyZGQwNTZjYTBkOTFhOTQ1MA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTExMTljZDNmMTk4NTg5OTQ5NWEzYTA5MDE3OTc5MmNkODY2YTIzNmRiNGI1
10
- NTUzNzI2NDlhM2NiMzViNzExY2IwNGZmNWYwYWI5NjY2MTg0OGM3NDRiOGQ4
11
- OTBlZjU3ZDk4NDhkZjIzNTBhNTBmNjQ5MDI3ZGQ3OGUzMzYzZjc=
9
+ MjcwZDM0YThjNGQyZjA2NzlkYTdhZjFiNjE5M2Y1MzYxMGM3YTczOTIyZWIy
10
+ NTJkOTFlZmM1YjUzZDhiNDQ0YzI0OGM3OWNhMTA1YzYwMzhlNjYwYzA2MThm
11
+ MjM2ODliYmQ2ZTI3MmZlZDUxYTM1YjE3NjAwOWZhZjA3YjA2NjU=
12
12
  data.tar.gz: !binary |-
13
- NjkzMTUwMzVlMTczZTIwYmZkMzk4NjQ3ODI3MTI0YjdkYjczNDA5ZTZiYjNi
14
- MWNhYTAxYjg3NzVhMDc0MTU5ODQ4OTk1MmYzZjUxN2IzODI3NTk1NDNlMTc1
15
- YTA0YWQ0YWVmMTE2OTFiMTM3NjJmNjY4NDM1YjgwYzgxNjFiNTg=
13
+ ZGM4NWRmMmFjMjYzM2IxYjkwNzZiOGIyYzhiZWUyNDQ5NjNhNzY4Y2Q0ZmZh
14
+ NjM5MGY0NDNkNzhlMTMzMzI5NTMxZGUyZTRlMjU5NDc4OGRlMWJiZTE0ZDVk
15
+ ZTYyYmFhMDczMDJlY2UxZTYxNzU2ZTgzYjZkNDMwZjdiMjg2NDQ=
@@ -1,5 +1,7 @@
1
1
  module Payola
2
2
  class AdminMailer < ActionMailer::Base
3
+ helper Payola::PriceHelper
4
+
3
5
  def receipt(sale_guid)
4
6
  ActiveRecord::Base.connection_pool.with_connection do
5
7
  @sale = Payola::Sale.find_by(guid: sale_guid)
@@ -1,6 +1,7 @@
1
1
  module Payola
2
2
  class ReceiptMailer < ActionMailer::Base
3
3
  add_template_helper ::ApplicationHelper
4
+ helper Payola::PriceHelper
4
5
 
5
6
  def receipt(sale_guid)
6
7
  ActiveRecord::Base.connection_pool.with_connection do
@@ -1,7 +1,7 @@
1
1
  module Payola
2
2
  class SendMail
3
3
  def self.call(mailer, method, *args)
4
- mailer.send(method, *args).deliver
4
+ mailer.safe_constantize.send(method, *args).deliver
5
5
  end
6
6
  end
7
7
  end
data/lib/payola.rb CHANGED
@@ -53,7 +53,7 @@ module Payola
53
53
  end
54
54
 
55
55
  def send_mail(mailer, method, *args)
56
- Payola.queue!(Payola::SendMail, mailer, method, *args)
56
+ Payola.queue!(Payola::SendMail, mailer.to_s, method.to_s, *args)
57
57
  end
58
58
 
59
59
  def reset!
@@ -1,3 +1,3 @@
1
1
  module Payola
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -10,11 +10,11 @@ module Payola
10
10
  end
11
11
 
12
12
  def self.call(klass, *args)
13
- perform_later(klass, *args)
13
+ perform_later(klass.to_s, *args)
14
14
  end
15
15
 
16
16
  def perform(klass, *args)
17
- klass.call(*args)
17
+ klass.safe_constantize.call(*args)
18
18
  end
19
19
  end
20
20
  end
@@ -2,7 +2,7 @@ module Payola
2
2
  module Worker
3
3
  class BaseWorker
4
4
  def perform(klass, *args)
5
- klass.call(*args)
5
+ klass.safe_constantize.call(*args)
6
6
  end
7
7
  end
8
8
  end
@@ -13,7 +13,7 @@ module Payola
13
13
  end
14
14
 
15
15
  def self.call(klass, *args)
16
- perform_async(klass, *args)
16
+ perform_async(klass.to_s, *args)
17
17
  end
18
18
  end
19
19
  end
@@ -13,7 +13,7 @@ module Payola
13
13
  end
14
14
 
15
15
  def self.call(klass, *args)
16
- new.async.perform(klass, *args)
16
+ new.async.perform(klass.to_s, *args)
17
17
  end
18
18
  end
19
19
  end
@@ -31239,3 +31239,1142 @@ Completed 302 Found in 2ms (ActiveRecord: 0.2ms)
31239
31239
   (0.0ms) rollback transaction
31240
31240
   (0.0ms) begin transaction
31241
31241
   (0.0ms) rollback transaction
31242
+  (1.1ms) CREATE TABLE "owners" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) 
31243
+  (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)
31244
+  (0.9ms) CREATE TABLE "payola_coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "code" varchar(255), "percent_off" integer, "created_at" datetime, "updated_at" datetime) 
31245
+  (1.0ms) 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))
31246
+  (0.2ms) select sqlite_version(*)
31247
+  (1.0ms) CREATE INDEX "index_payola_sales_on_coupon_id" ON "payola_sales" ("coupon_id")
31248
+  (0.1ms)  SELECT sql
31249
+ FROM sqlite_master
31250
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31251
+ UNION ALL
31252
+ SELECT sql
31253
+ FROM sqlite_temp_master
31254
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31255
+ 
31256
+  (0.9ms) CREATE INDEX "index_payola_sales_on_email" ON "payola_sales" ("email")
31257
+  (0.1ms)  SELECT sql
31258
+ FROM sqlite_master
31259
+ WHERE name='index_payola_sales_on_email' AND type='index'
31260
+ UNION ALL
31261
+ SELECT sql
31262
+ FROM sqlite_temp_master
31263
+ WHERE name='index_payola_sales_on_email' AND type='index'
31264
+ 
31265
+  (0.1ms) SELECT sql
31266
+ FROM sqlite_master
31267
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31268
+ UNION ALL
31269
+ SELECT sql
31270
+ FROM sqlite_temp_master
31271
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31272
+
31273
+  (0.9ms) CREATE INDEX "index_payola_sales_on_guid" ON "payola_sales" ("guid")
31274
+  (0.1ms) SELECT sql
31275
+ FROM sqlite_master
31276
+ WHERE name='index_payola_sales_on_guid' AND type='index'
31277
+ UNION ALL
31278
+ SELECT sql
31279
+ FROM sqlite_temp_master
31280
+ WHERE name='index_payola_sales_on_guid' AND type='index'
31281
+
31282
+  (0.1ms)  SELECT sql
31283
+ FROM sqlite_master
31284
+ WHERE name='index_payola_sales_on_email' AND type='index'
31285
+ UNION ALL
31286
+ SELECT sql
31287
+ FROM sqlite_temp_master
31288
+ WHERE name='index_payola_sales_on_email' AND type='index'
31289
+ 
31290
+  (0.1ms) SELECT sql
31291
+ FROM sqlite_master
31292
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31293
+ UNION ALL
31294
+ SELECT sql
31295
+ FROM sqlite_temp_master
31296
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31297
+
31298
+  (0.9ms) CREATE INDEX "index_payola_sales_on_owner_id_and_owner_type" ON "payola_sales" ("owner_id", "owner_type")
31299
+  (0.1ms) SELECT sql
31300
+ FROM sqlite_master
31301
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
31302
+ UNION ALL
31303
+ SELECT sql
31304
+ FROM sqlite_temp_master
31305
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
31306
+
31307
+  (0.1ms)  SELECT sql
31308
+ FROM sqlite_master
31309
+ WHERE name='index_payola_sales_on_guid' AND type='index'
31310
+ UNION ALL
31311
+ SELECT sql
31312
+ FROM sqlite_temp_master
31313
+ WHERE name='index_payola_sales_on_guid' AND type='index'
31314
+ 
31315
+  (0.1ms) SELECT sql
31316
+ FROM sqlite_master
31317
+ WHERE name='index_payola_sales_on_email' AND type='index'
31318
+ UNION ALL
31319
+ SELECT sql
31320
+ FROM sqlite_temp_master
31321
+ WHERE name='index_payola_sales_on_email' AND type='index'
31322
+
31323
+  (0.1ms)  SELECT sql
31324
+ FROM sqlite_master
31325
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31326
+ UNION ALL
31327
+ SELECT sql
31328
+ FROM sqlite_temp_master
31329
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31330
+ 
31331
+  (0.9ms) CREATE INDEX "index_payola_sales_on_product" ON "payola_sales" ("product_id", "product_type")
31332
+  (0.1ms)  SELECT sql
31333
+ FROM sqlite_master
31334
+ WHERE name='index_payola_sales_on_product' AND type='index'
31335
+ UNION ALL
31336
+ SELECT sql
31337
+ FROM sqlite_temp_master
31338
+ WHERE name='index_payola_sales_on_product' AND type='index'
31339
+ 
31340
+  (0.1ms) SELECT sql
31341
+ FROM sqlite_master
31342
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
31343
+ UNION ALL
31344
+ SELECT sql
31345
+ FROM sqlite_temp_master
31346
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
31347
+
31348
+  (0.1ms)  SELECT sql
31349
+ FROM sqlite_master
31350
+ WHERE name='index_payola_sales_on_guid' AND type='index'
31351
+ UNION ALL
31352
+ SELECT sql
31353
+ FROM sqlite_temp_master
31354
+ WHERE name='index_payola_sales_on_guid' AND type='index'
31355
+ 
31356
+  (0.1ms) SELECT sql
31357
+ FROM sqlite_master
31358
+ WHERE name='index_payola_sales_on_email' AND type='index'
31359
+ UNION ALL
31360
+ SELECT sql
31361
+ FROM sqlite_temp_master
31362
+ WHERE name='index_payola_sales_on_email' AND type='index'
31363
+
31364
+  (0.1ms)  SELECT sql
31365
+ FROM sqlite_master
31366
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31367
+ UNION ALL
31368
+ SELECT sql
31369
+ FROM sqlite_temp_master
31370
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31371
+ 
31372
+  (0.9ms) CREATE INDEX "index_payola_sales_on_stripe_customer_id" ON "payola_sales" ("stripe_customer_id")
31373
+  (0.7ms) CREATE TABLE "payola_stripe_webhooks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "stripe_id" varchar(255), "created_at" datetime, "updated_at" datetime) 
31374
+  (0.8ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "permalink" varchar(255), "price" integer, "created_at" datetime, "updated_at" datetime)
31375
+  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
31376
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
31377
+  (0.1ms) SELECT version FROM "schema_migrations"
31378
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20141029140518')
31379
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141001230848')
31380
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141001170138')
31381
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141001203541')
31382
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141002013618')
31383
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141002013701')
31384
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20141002203725')
31385
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141017233304')
31386
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141026101628')
31387
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141026144800')
31388
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141029135848')
31389
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
31390
+  (0.1ms) begin transaction
31391
+  (0.1ms) rollback transaction
31392
+  (0.1ms) begin transaction
31393
+  (0.0ms) rollback transaction
31394
+  (0.0ms) begin transaction
31395
+  (0.0ms) rollback transaction
31396
+  (0.0ms) begin transaction
31397
+  (0.0ms) SAVEPOINT active_record_1
31398
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-1' LIMIT 1
31399
+ SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.329488"], ["name", "Foo"], ["permalink", "foo-1"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.329488"]]
31400
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31401
+  (0.1ms) SAVEPOINT active_record_1
31402
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31403
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31404
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '6n3l4k' LIMIT 1
31405
+ SQL (1.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 19:00:20.341394"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "6n3l4k"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 19:00:20.341394"]]
31406
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31407
+  (0.0ms) SAVEPOINT active_record_1
31408
+ SQL (0.2ms) INSERT INTO "owners" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-03 19:00:20.346444"], ["updated_at", "2014-11-03 19:00:20.346444"]]
31409
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31410
+  (0.0ms) SAVEPOINT active_record_1
31411
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = '6n3l4k' AND "payola_sales"."id" != 1) LIMIT 1
31412
+ 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 19:00:20.351374"]]
31413
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31414
+  (0.7ms) rollback transaction
31415
+  (0.1ms) begin transaction
31416
+  (0.1ms) SAVEPOINT active_record_1
31417
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-2' LIMIT 1
31418
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.358024"], ["name", "Foo"], ["permalink", "foo-2"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.358024"]]
31419
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31420
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31421
+  (0.4ms) rollback transaction
31422
+  (0.0ms) begin transaction
31423
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31424
+  (0.0ms) rollback transaction
31425
+  (0.0ms) begin transaction
31426
+  (0.0ms) SAVEPOINT active_record_1
31427
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-3' LIMIT 1
31428
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.414160"], ["name", "Foo"], ["permalink", "foo-3"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.414160"]]
31429
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31430
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31431
+  (0.4ms) rollback transaction
31432
+  (0.0ms) begin transaction
31433
+  (0.0ms) SAVEPOINT active_record_1
31434
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-4' LIMIT 1
31435
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.418458"], ["name", "Foo"], ["permalink", "foo-4"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.418458"]]
31436
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31437
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31438
+  (0.4ms) rollback transaction
31439
+  (0.1ms) begin transaction
31440
+  (0.1ms) SAVEPOINT active_record_1
31441
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-5' LIMIT 1
31442
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.425700"], ["name", "Foo"], ["permalink", "foo-5"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.425700"]]
31443
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31444
+  (0.0ms) SAVEPOINT active_record_1
31445
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31446
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31447
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'mpc0op' LIMIT 1
31448
+ 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 19:00:20.429556"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "mpc0op"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 19:00:20.429556"]]
31449
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31450
+  (0.1ms) SAVEPOINT active_record_1
31451
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'errored' WHERE "payola_sales"."id" = 1
31452
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31453
+  (0.6ms) rollback transaction
31454
+  (0.1ms) begin transaction
31455
+  (0.1ms) SAVEPOINT active_record_1
31456
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-6' LIMIT 1
31457
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.442682"], ["name", "Foo"], ["permalink", "foo-6"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.442682"]]
31458
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31459
+  (0.0ms) SAVEPOINT active_record_1
31460
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31461
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31462
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'htf0ti' LIMIT 1
31463
+ 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 19:00:20.446525"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "htf0ti"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 19:00:20.446525"]]
31464
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31465
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'htf0ti' AND "payola_sales"."id" != 1) LIMIT 1
31466
+  (0.1ms) SAVEPOINT active_record_1
31467
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-7' LIMIT 1
31468
+ SQL (0.1ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.451262"], ["name", "Foo"], ["permalink", "foo-7"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.451262"]]
31469
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31470
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'htf0ti' LIMIT 1
31471
+  (0.5ms) rollback transaction
31472
+  (0.1ms) begin transaction
31473
+  (0.1ms) SAVEPOINT active_record_1
31474
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-8' LIMIT 1
31475
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.458293"], ["name", "Foo"], ["permalink", "foo-8"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.458293"]]
31476
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31477
+  (0.0ms) SAVEPOINT active_record_1
31478
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31479
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31480
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'df70d9' LIMIT 1
31481
+ 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 19:00:20.462145"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "df70d9"], ["product_id", 1], ["product_type", "Product"], ["state", "finished"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 19:00:20.462145"]]
31482
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31483
+  (0.1ms) SAVEPOINT active_record_1
31484
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'refunded' WHERE "payola_sales"."id" = 1
31485
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31486
+  (0.5ms) rollback transaction
31487
+  (0.1ms) begin transaction
31488
+  (0.1ms) SAVEPOINT active_record_1
31489
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-9' LIMIT 1
31490
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.470542"], ["name", "Foo"], ["permalink", "foo-9"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.470542"]]
31491
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31492
+  (0.0ms) SAVEPOINT active_record_1
31493
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31494
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31495
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'ng5fko' LIMIT 1
31496
+ 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 19:00:20.474378"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "ng5fko"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 19:00:20.474378"]]
31497
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31498
+  (0.0ms) SAVEPOINT active_record_1
31499
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'processing' WHERE "payola_sales"."id" = 1
31500
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31501
+  (0.5ms) rollback transaction
31502
+  (0.1ms) begin transaction
31503
+  (0.1ms) SAVEPOINT active_record_1
31504
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-10' LIMIT 1
31505
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.481498"], ["name", "Foo"], ["permalink", "foo-10"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.481498"]]
31506
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31507
+  (0.0ms) SAVEPOINT active_record_1
31508
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31509
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31510
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'kl574i' LIMIT 1
31511
+ 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 19:00:20.485368"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "kl574i"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 19:00:20.485368"]]
31512
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31513
+  (0.0ms) SAVEPOINT active_record_1
31514
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'kl574i' AND "payola_sales"."id" != 1) LIMIT 1
31515
+ 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 19:00:20.488304"]]
31516
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31517
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
31518
+  (0.5ms) rollback transaction
31519
+  (0.1ms) begin transaction
31520
+  (0.1ms) SAVEPOINT active_record_1
31521
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-11' LIMIT 1
31522
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.494569"], ["name", "Foo"], ["permalink", "foo-11"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.494569"]]
31523
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31524
+  (0.0ms) SAVEPOINT active_record_1
31525
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31526
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31527
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'kq09fh' LIMIT 1
31528
+ 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 19:00:20.498661"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "kq09fh"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 19:00:20.498661"]]
31529
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31530
+  (0.1ms) SAVEPOINT active_record_1
31531
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
31532
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31533
+  (0.5ms) rollback transaction
31534
+  (0.1ms) begin transaction
31535
+  (0.1ms) rollback transaction
31536
+  (0.1ms) begin transaction
31537
+  (0.1ms) rollback transaction
31538
+  (0.1ms) begin transaction
31539
+  (0.1ms) rollback transaction
31540
+  (0.1ms) begin transaction
31541
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-13' LIMIT 1
31542
+  (0.1ms) rollback transaction
31543
+  (0.1ms) begin transaction
31544
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'f' LIMIT 1
31545
+  (0.1ms) rollback transaction
31546
+  (0.1ms) begin transaction
31547
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-14' LIMIT 1
31548
+  (0.1ms) rollback transaction
31549
+  (0.1ms) begin transaction
31550
+  (0.1ms) rollback transaction
31551
+  (0.1ms) begin transaction
31552
+  (0.1ms) SAVEPOINT active_record_1
31553
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-15' LIMIT 1
31554
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.523854"], ["name", "Foo"], ["permalink", "foo-15"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.523854"]]
31555
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31556
+  (0.0ms) SAVEPOINT active_record_1
31557
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31558
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31559
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '2cl5oi' LIMIT 1
31560
+ 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 19:00:20.527102"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "2cl5oi"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 19:00:20.527102"]]
31561
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31562
+  (0.0ms) SAVEPOINT active_record_1
31563
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = '2cl5oi' AND "payola_sales"."id" != 1) LIMIT 1
31564
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31565
+  (0.0ms) SAVEPOINT active_record_1
31566
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = '2cl5oi' AND "payola_sales"."id" != 1) LIMIT 1
31567
+ 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 19:00:20.531016"]]
31568
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31569
+  (0.0ms) SAVEPOINT active_record_1
31570
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
31571
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31572
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
31573
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
31574
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
31575
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
31576
+  (0.6ms) rollback transaction
31577
+  (0.0ms) begin transaction
31578
+  (0.1ms) SAVEPOINT active_record_1
31579
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-16' LIMIT 1
31580
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.537621"], ["name", "Foo"], ["permalink", "foo-16"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.537621"]]
31581
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31582
+  (0.1ms) SAVEPOINT active_record_1
31583
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31584
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31585
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'shgq23' LIMIT 1
31586
+ 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 19:00:20.540552"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "shgq23"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 19:00:20.540552"]]
31587
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31588
+  (0.0ms) SAVEPOINT active_record_1
31589
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'shgq23' AND "payola_sales"."id" != 1) LIMIT 1
31590
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31591
+  (0.0ms) SAVEPOINT active_record_1
31592
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'shgq23' AND "payola_sales"."id" != 1) LIMIT 1
31593
+ 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 19:00:20.544373"]]
31594
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31595
+  (0.0ms) SAVEPOINT active_record_1
31596
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
31597
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31598
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
31599
+  (0.7ms) rollback transaction
31600
+  (0.1ms) begin transaction
31601
+  (0.1ms) SAVEPOINT active_record_1
31602
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-17' LIMIT 1
31603
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.550617"], ["name", "Foo"], ["permalink", "foo-17"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.550617"]]
31604
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31605
+  (0.0ms) SAVEPOINT active_record_1
31606
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31607
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31608
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'gnr1k9' LIMIT 1
31609
+ 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 19:00:20.553423"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "gnr1k9"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 19:00:20.553423"]]
31610
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31611
+  (0.0ms) SAVEPOINT active_record_1
31612
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'gnr1k9' AND "payola_sales"."id" != 1) LIMIT 1
31613
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31614
+  (0.0ms) SAVEPOINT active_record_1
31615
+ Payola::Sale Exists (0.2ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'gnr1k9' AND "payola_sales"."id" != 1) LIMIT 1
31616
+ 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 19:00:20.557611"]]
31617
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31618
+  (0.1ms) SAVEPOINT active_record_1
31619
+ SQL (0.2ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
31620
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31621
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
31622
+  (0.6ms) rollback transaction
31623
+  (0.1ms) begin transaction
31624
+  (0.0ms) SAVEPOINT active_record_1
31625
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-18' LIMIT 1
31626
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.565289"], ["name", "Foo"], ["permalink", "foo-18"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.565289"]]
31627
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31628
+  (0.0ms) SAVEPOINT active_record_1
31629
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31630
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31631
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '2pap1p' LIMIT 1
31632
+ 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 19:00:20.567955"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "2pap1p"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 19:00:20.567955"]]
31633
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31634
+  (0.0ms) SAVEPOINT active_record_1
31635
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = '2pap1p' AND "payola_sales"."id" != 1) LIMIT 1
31636
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31637
+  (0.0ms) SAVEPOINT active_record_1
31638
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = '2pap1p' AND "payola_sales"."id" != 1) LIMIT 1
31639
+ 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 19:00:20.571366"]]
31640
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31641
+  (0.0ms) SAVEPOINT active_record_1
31642
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'errored' WHERE "payola_sales"."id" = 1
31643
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31644
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
31645
+  (0.6ms) rollback transaction
31646
+  (0.1ms) begin transaction
31647
+  (0.1ms) rollback transaction
31648
+  (0.1ms) begin transaction
31649
+  (0.1ms) rollback transaction
31650
+  (0.0ms) begin transaction
31651
+  (0.0ms) rollback transaction
31652
+  (0.0ms) begin transaction
31653
+  (0.0ms) rollback transaction
31654
+  (0.0ms) begin transaction
31655
+  (0.1ms) rollback transaction
31656
+  (0.0ms) begin transaction
31657
+  (0.1ms) rollback transaction
31658
+  (0.1ms) begin transaction
31659
+  (0.0ms) rollback transaction
31660
+  (0.0ms) begin transaction
31661
+  (0.0ms) rollback transaction
31662
+  (0.0ms) begin transaction
31663
+  (0.1ms) rollback transaction
31664
+  (0.0ms) begin transaction
31665
+  (0.0ms) rollback transaction
31666
+  (0.0ms) begin transaction
31667
+  (0.0ms) rollback transaction
31668
+  (0.0ms) begin transaction
31669
+  (0.0ms) rollback transaction
31670
+  (0.0ms) begin transaction
31671
+  (0.1ms) rollback transaction
31672
+  (0.0ms) begin transaction
31673
+  (0.1ms) SAVEPOINT active_record_1
31674
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-19' LIMIT 1
31675
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.655898"], ["name", "Foo"], ["permalink", "foo-19"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.655898"]]
31676
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31677
+ Processing by Payola::TransactionsController#status as HTML
31678
+ Parameters: {"guid"=>"doesnotexist"}
31679
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."guid" = 'doesnotexist' ORDER BY "payola_sales"."id" ASC LIMIT 1
31680
+ Completed 404 Not Found in 6ms (Views: 4.8ms | ActiveRecord: 0.1ms)
31681
+  (0.5ms) rollback transaction
31682
+  (0.1ms) begin transaction
31683
+  (0.0ms) SAVEPOINT active_record_1
31684
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-20' LIMIT 1
31685
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.669530"], ["name", "Foo"], ["permalink", "foo-20"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.669530"]]
31686
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31687
+  (0.0ms) SAVEPOINT active_record_1
31688
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-21' LIMIT 1
31689
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.671557"], ["name", "Foo"], ["permalink", "foo-21"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.671557"]]
31690
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31691
+  (0.0ms) SAVEPOINT active_record_1
31692
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31693
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31694
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '450fq9' LIMIT 1
31695
+ 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 19:00:20.673989"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "450fq9"], ["product_id", 2], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 19:00:20.673989"]]
31696
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31697
+ Processing by Payola::TransactionsController#status as HTML
31698
+ Parameters: {"guid"=>"450fq9"}
31699
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."guid" = '450fq9' ORDER BY "payola_sales"."id" ASC LIMIT 1
31700
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
31701
+  (0.7ms) rollback transaction
31702
+  (0.1ms) begin transaction
31703
+  (0.1ms) SAVEPOINT active_record_1
31704
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-22' LIMIT 1
31705
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.682638"], ["name", "Foo"], ["permalink", "foo-22"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.682638"]]
31706
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31707
+  (0.0ms) SAVEPOINT active_record_1
31708
+ Product Exists (0.0ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-23' LIMIT 1
31709
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.684673"], ["name", "Foo"], ["permalink", "foo-23"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.684673"]]
31710
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31711
+  (0.0ms) SAVEPOINT active_record_1
31712
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31713
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
31714
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '22ic6o' LIMIT 1
31715
+ 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 19:00:20.687125"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "22ic6o"], ["product_id", 2], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 19:00:20.687125"]]
31716
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31717
+ Processing by Payola::TransactionsController#show as HTML
31718
+ Parameters: {"guid"=>"22ic6o"}
31719
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."guid" = '22ic6o' LIMIT 1
31720
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 2]]
31721
+ Redirected to http://test.host/
31722
+ Completed 302 Found in 4ms (ActiveRecord: 0.2ms)
31723
+  (0.5ms) rollback transaction
31724
+  (0.1ms) begin transaction
31725
+  (0.1ms) SAVEPOINT active_record_1
31726
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-24' LIMIT 1
31727
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.698061"], ["name", "Foo"], ["permalink", "foo-24"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.698061"]]
31728
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31729
+ Processing by Payola::TransactionsController#create as HTML
31730
+ Parameters: {"product_class"=>"product", "permalink"=>"foo-24"}
31731
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."permalink" = 'foo-24' LIMIT 1
31732
+ Payola::Coupon Load (0.1ms) SELECT "payola_coupons".* FROM "payola_coupons" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_coupons"."id" ASC LIMIT 1
31733
+ Payola::Affiliate Load (0.1ms) SELECT "payola_affiliates".* FROM "payola_affiliates" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_affiliates"."id" ASC LIMIT 1
31734
+ Completed 200 OK in 8ms (Views: 0.2ms | ActiveRecord: 0.7ms)
31735
+  (0.5ms) rollback transaction
31736
+  (0.0ms) begin transaction
31737
+  (0.0ms) SAVEPOINT active_record_1
31738
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-25' LIMIT 1
31739
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.714320"], ["name", "Foo"], ["permalink", "foo-25"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.714320"]]
31740
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31741
+ Processing by Payola::TransactionsController#create as HTML
31742
+ Parameters: {"product_class"=>"product", "permalink"=>"foo-25"}
31743
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."permalink" = 'foo-25' LIMIT 1
31744
+ Payola::Coupon Load (0.1ms) SELECT "payola_coupons".* FROM "payola_coupons" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_coupons"."id" ASC LIMIT 1
31745
+ Payola::Affiliate Load (0.1ms) SELECT "payola_affiliates".* FROM "payola_affiliates" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_affiliates"."id" ASC LIMIT 1
31746
+ Completed 400 Bad Request in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms)
31747
+  (0.3ms) rollback transaction
31748
+  (0.0ms) begin transaction
31749
+ Payola::StripeWebhook Exists (0.1ms) SELECT 1 AS one FROM "payola_stripe_webhooks" WHERE "payola_stripe_webhooks"."stripe_id" = 'test_id' LIMIT 1
31750
+  (0.1ms) rollback transaction
31751
+  (0.0ms) begin transaction
31752
+  (0.0ms) SAVEPOINT active_record_1
31753
+ Payola::StripeWebhook Exists (0.1ms) SELECT 1 AS one FROM "payola_stripe_webhooks" WHERE "payola_stripe_webhooks"."stripe_id" = 'test_id' LIMIT 1
31754
+ SQL (0.2ms) INSERT INTO "payola_stripe_webhooks" ("created_at", "stripe_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-03 19:00:20.727396"], ["stripe_id", "test_id"], ["updated_at", "2014-11-03 19:00:20.727396"]]
31755
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31756
+ Payola::StripeWebhook Exists (0.1ms) SELECT 1 AS one FROM "payola_stripe_webhooks" WHERE "payola_stripe_webhooks"."stripe_id" = 'test_id' LIMIT 1
31757
+  (0.5ms) rollback transaction
31758
+  (0.1ms) begin transaction
31759
+  (0.1ms) rollback transaction
31760
+  (0.1ms) begin transaction
31761
+  (0.0ms) rollback transaction
31762
+  (0.0ms) begin transaction
31763
+  (0.0ms) rollback transaction
31764
+  (0.0ms) begin transaction
31765
+  (0.0ms) rollback transaction
31766
+  (0.0ms) begin transaction
31767
+  (0.0ms) rollback transaction
31768
+  (0.0ms) begin transaction
31769
+  (0.1ms) rollback transaction
31770
+  (0.0ms) begin transaction
31771
+  (0.0ms) rollback transaction
31772
+  (0.0ms) begin transaction
31773
+  (0.1ms) rollback transaction
31774
+  (0.0ms) begin transaction
31775
+  (0.0ms) SAVEPOINT active_record_1
31776
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-26' LIMIT 1
31777
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.749272"], ["name", "Foo"], ["permalink", "foo-26"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.749272"]]
31778
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31779
+  (0.4ms) rollback transaction
31780
+  (0.0ms) begin transaction
31781
+  (0.0ms) SAVEPOINT active_record_1
31782
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-27' LIMIT 1
31783
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.752925"], ["name", "Foo"], ["permalink", "foo-27"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.752925"]]
31784
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31785
+  (0.0ms) SAVEPOINT active_record_1
31786
+ Payola::Affiliate Exists (0.1ms) SELECT 1 AS one FROM "payola_affiliates" WHERE "payola_affiliates"."code" = 'MyString' LIMIT 1
31787
+ SQL (0.3ms) INSERT INTO "payola_affiliates" ("code", "created_at", "email", "percent", "updated_at") VALUES (?, ?, ?, ?, ?) [["code", "MyString"], ["created_at", "2014-11-03 19:00:20.758988"], ["email", "foo@example.com"], ["percent", 100], ["updated_at", "2014-11-03 19:00:20.758988"]]
31788
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31789
+ Payola::Affiliate Load (0.1ms) SELECT "payola_affiliates".* FROM "payola_affiliates" WHERE "payola_affiliates"."id" = ? LIMIT 1 [["id", 1]]
31790
+  (0.5ms) rollback transaction
31791
+  (0.1ms) begin transaction
31792
+  (0.1ms) SAVEPOINT active_record_1
31793
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-28' LIMIT 1
31794
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.768404"], ["name", "Foo"], ["permalink", "foo-28"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.768404"]]
31795
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31796
+  (0.1ms) SAVEPOINT active_record_1
31797
+ Payola::Coupon Exists (0.1ms) SELECT 1 AS one FROM "payola_coupons" WHERE "payola_coupons"."code" = 'MyString' LIMIT 1
31798
+ SQL (0.3ms) INSERT INTO "payola_coupons" ("code", "created_at", "percent_off", "updated_at") VALUES (?, ?, ?, ?) [["code", "MyString"], ["created_at", "2014-11-03 19:00:20.818319"], ["percent_off", 1], ["updated_at", "2014-11-03 19:00:20.818319"]]
31799
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31800
+  (0.6ms) rollback transaction
31801
+  (0.1ms) begin transaction
31802
+  (0.0ms) SAVEPOINT active_record_1
31803
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-29' LIMIT 1
31804
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 19:00:20.825133"], ["name", "Foo"], ["permalink", "foo-29"], ["price", 100], ["updated_at", "2014-11-03 19:00:20.825133"]]
31805
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31806
+  (0.0ms) SAVEPOINT active_record_1
31807
+ Payola::Coupon Exists (0.1ms) SELECT 1 AS one FROM "payola_coupons" WHERE "payola_coupons"."code" = 'MyString' LIMIT 1
31808
+ SQL (0.3ms) INSERT INTO "payola_coupons" ("code", "created_at", "percent_off", "updated_at") VALUES (?, ?, ?, ?) [["code", "MyString"], ["created_at", "2014-11-03 19:00:20.827289"], ["percent_off", 1], ["updated_at", "2014-11-03 19:00:20.827289"]]
31809
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31810
+  (0.4ms) rollback transaction
31811
+  (1.1ms) CREATE TABLE "owners" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) 
31812
+  (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)
31813
+  (0.9ms) CREATE TABLE "payola_coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "code" varchar(255), "percent_off" integer, "created_at" datetime, "updated_at" datetime) 
31814
+  (0.9ms) 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))
31815
+  (0.2ms) select sqlite_version(*)
31816
+  (1.0ms) CREATE INDEX "index_payola_sales_on_coupon_id" ON "payola_sales" ("coupon_id")
31817
+  (0.1ms)  SELECT sql
31818
+ FROM sqlite_master
31819
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31820
+ UNION ALL
31821
+ SELECT sql
31822
+ FROM sqlite_temp_master
31823
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31824
+ 
31825
+  (0.7ms) CREATE INDEX "index_payola_sales_on_email" ON "payola_sales" ("email")
31826
+  (0.1ms)  SELECT sql
31827
+ FROM sqlite_master
31828
+ WHERE name='index_payola_sales_on_email' AND type='index'
31829
+ UNION ALL
31830
+ SELECT sql
31831
+ FROM sqlite_temp_master
31832
+ WHERE name='index_payola_sales_on_email' AND type='index'
31833
+ 
31834
+  (0.1ms) SELECT sql
31835
+ FROM sqlite_master
31836
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31837
+ UNION ALL
31838
+ SELECT sql
31839
+ FROM sqlite_temp_master
31840
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31841
+
31842
+  (0.7ms) CREATE INDEX "index_payola_sales_on_guid" ON "payola_sales" ("guid")
31843
+  (0.1ms) SELECT sql
31844
+ FROM sqlite_master
31845
+ WHERE name='index_payola_sales_on_guid' AND type='index'
31846
+ UNION ALL
31847
+ SELECT sql
31848
+ FROM sqlite_temp_master
31849
+ WHERE name='index_payola_sales_on_guid' AND type='index'
31850
+
31851
+  (0.1ms)  SELECT sql
31852
+ FROM sqlite_master
31853
+ WHERE name='index_payola_sales_on_email' AND type='index'
31854
+ UNION ALL
31855
+ SELECT sql
31856
+ FROM sqlite_temp_master
31857
+ WHERE name='index_payola_sales_on_email' AND type='index'
31858
+ 
31859
+  (0.1ms) SELECT sql
31860
+ FROM sqlite_master
31861
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31862
+ UNION ALL
31863
+ SELECT sql
31864
+ FROM sqlite_temp_master
31865
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31866
+
31867
+  (1.0ms) CREATE INDEX "index_payola_sales_on_owner_id_and_owner_type" ON "payola_sales" ("owner_id", "owner_type")
31868
+  (0.1ms) SELECT sql
31869
+ FROM sqlite_master
31870
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
31871
+ UNION ALL
31872
+ SELECT sql
31873
+ FROM sqlite_temp_master
31874
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
31875
+
31876
+  (0.1ms)  SELECT sql
31877
+ FROM sqlite_master
31878
+ WHERE name='index_payola_sales_on_guid' AND type='index'
31879
+ UNION ALL
31880
+ SELECT sql
31881
+ FROM sqlite_temp_master
31882
+ WHERE name='index_payola_sales_on_guid' AND type='index'
31883
+ 
31884
+  (0.1ms) SELECT sql
31885
+ FROM sqlite_master
31886
+ WHERE name='index_payola_sales_on_email' AND type='index'
31887
+ UNION ALL
31888
+ SELECT sql
31889
+ FROM sqlite_temp_master
31890
+ WHERE name='index_payola_sales_on_email' AND type='index'
31891
+
31892
+  (0.1ms)  SELECT sql
31893
+ FROM sqlite_master
31894
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31895
+ UNION ALL
31896
+ SELECT sql
31897
+ FROM sqlite_temp_master
31898
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31899
+ 
31900
+  (0.9ms) CREATE INDEX "index_payola_sales_on_product" ON "payola_sales" ("product_id", "product_type")
31901
+  (0.1ms)  SELECT sql
31902
+ FROM sqlite_master
31903
+ WHERE name='index_payola_sales_on_product' AND type='index'
31904
+ UNION ALL
31905
+ SELECT sql
31906
+ FROM sqlite_temp_master
31907
+ WHERE name='index_payola_sales_on_product' AND type='index'
31908
+ 
31909
+  (0.1ms) SELECT sql
31910
+ FROM sqlite_master
31911
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
31912
+ UNION ALL
31913
+ SELECT sql
31914
+ FROM sqlite_temp_master
31915
+ WHERE name='index_payola_sales_on_owner_id_and_owner_type' AND type='index'
31916
+
31917
+  (0.1ms)  SELECT sql
31918
+ FROM sqlite_master
31919
+ WHERE name='index_payola_sales_on_guid' AND type='index'
31920
+ UNION ALL
31921
+ SELECT sql
31922
+ FROM sqlite_temp_master
31923
+ WHERE name='index_payola_sales_on_guid' AND type='index'
31924
+ 
31925
+  (0.1ms) SELECT sql
31926
+ FROM sqlite_master
31927
+ WHERE name='index_payola_sales_on_email' AND type='index'
31928
+ UNION ALL
31929
+ SELECT sql
31930
+ FROM sqlite_temp_master
31931
+ WHERE name='index_payola_sales_on_email' AND type='index'
31932
+
31933
+  (0.1ms)  SELECT sql
31934
+ FROM sqlite_master
31935
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31936
+ UNION ALL
31937
+ SELECT sql
31938
+ FROM sqlite_temp_master
31939
+ WHERE name='index_payola_sales_on_coupon_id' AND type='index'
31940
+ 
31941
+  (0.9ms) CREATE INDEX "index_payola_sales_on_stripe_customer_id" ON "payola_sales" ("stripe_customer_id")
31942
+  (0.7ms) CREATE TABLE "payola_stripe_webhooks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "stripe_id" varchar(255), "created_at" datetime, "updated_at" datetime) 
31943
+  (0.8ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "permalink" varchar(255), "price" integer, "created_at" datetime, "updated_at" datetime)
31944
+  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
31945
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
31946
+  (0.1ms) SELECT version FROM "schema_migrations"
31947
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20141029140518')
31948
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141001230848')
31949
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141001170138')
31950
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141001203541')
31951
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141002013618')
31952
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141002013701')
31953
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141002203725')
31954
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141017233304')
31955
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141026101628')
31956
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141026144800')
31957
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141029135848')
31958
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
31959
+  (0.1ms) begin transaction
31960
+  (0.1ms) rollback transaction
31961
+  (0.1ms) begin transaction
31962
+  (0.1ms) SAVEPOINT active_record_1
31963
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-1' LIMIT 1
31964
+ SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.610155"], ["name", "Foo"], ["permalink", "foo-1"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.610155"]]
31965
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31966
+  (0.4ms) rollback transaction
31967
+  (0.1ms) begin transaction
31968
+  (0.1ms) SAVEPOINT active_record_1
31969
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-2' LIMIT 1
31970
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.644276"], ["name", "Foo"], ["permalink", "foo-2"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.644276"]]
31971
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31972
+  (0.1ms) SAVEPOINT active_record_1
31973
+ Payola::Affiliate Exists (0.1ms) SELECT 1 AS one FROM "payola_affiliates" WHERE "payola_affiliates"."code" = 'MyString' LIMIT 1
31974
+ SQL (0.9ms) INSERT INTO "payola_affiliates" ("code", "created_at", "email", "percent", "updated_at") VALUES (?, ?, ?, ?, ?) [["code", "MyString"], ["created_at", "2014-11-03 21:16:39.654535"], ["email", "foo@example.com"], ["percent", 100], ["updated_at", "2014-11-03 21:16:39.654535"]]
31975
+  (0.1ms) RELEASE SAVEPOINT active_record_1
31976
+ Payola::Affiliate Load (0.1ms) SELECT "payola_affiliates".* FROM "payola_affiliates" WHERE "payola_affiliates"."id" = ? LIMIT 1 [["id", 1]]
31977
+  (0.5ms) rollback transaction
31978
+  (0.0ms) begin transaction
31979
+  (0.0ms) SAVEPOINT active_record_1
31980
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-3' LIMIT 1
31981
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.701638"], ["name", "Foo"], ["permalink", "foo-3"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.701638"]]
31982
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31983
+  (0.1ms) SAVEPOINT active_record_1
31984
+ Payola::Coupon Exists (0.1ms) SELECT 1 AS one FROM "payola_coupons" WHERE "payola_coupons"."code" = 'MyString' LIMIT 1
31985
+ SQL (0.4ms) INSERT INTO "payola_coupons" ("code", "created_at", "percent_off", "updated_at") VALUES (?, ?, ?, ?) [["code", "MyString"], ["created_at", "2014-11-03 21:16:39.712523"], ["percent_off", 1], ["updated_at", "2014-11-03 21:16:39.712523"]]
31986
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31987
+  (0.4ms) rollback transaction
31988
+  (0.0ms) begin transaction
31989
+  (0.0ms) SAVEPOINT active_record_1
31990
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-4' LIMIT 1
31991
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.718452"], ["name", "Foo"], ["permalink", "foo-4"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.718452"]]
31992
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31993
+  (0.0ms) SAVEPOINT active_record_1
31994
+ Payola::Coupon Exists (0.0ms) SELECT 1 AS one FROM "payola_coupons" WHERE "payola_coupons"."code" = 'MyString' LIMIT 1
31995
+ SQL (0.2ms) INSERT INTO "payola_coupons" ("code", "created_at", "percent_off", "updated_at") VALUES (?, ?, ?, ?) [["code", "MyString"], ["created_at", "2014-11-03 21:16:39.720208"], ["percent_off", 1], ["updated_at", "2014-11-03 21:16:39.720208"]]
31996
+  (0.0ms) RELEASE SAVEPOINT active_record_1
31997
+  (0.3ms) rollback transaction
31998
+  (0.1ms) begin transaction
31999
+  (0.0ms) rollback transaction
32000
+  (0.0ms) begin transaction
32001
+  (0.0ms) rollback transaction
32002
+  (0.1ms) begin transaction
32003
+  (0.1ms) SAVEPOINT active_record_1
32004
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-5' LIMIT 1
32005
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.731572"], ["name", "Foo"], ["permalink", "foo-5"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.731572"]]
32006
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32007
+ Processing by Payola::TransactionsController#status as HTML
32008
+ Parameters: {"guid"=>"doesnotexist"}
32009
+ Payola::Sale Load (0.2ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."guid" = 'doesnotexist' ORDER BY "payola_sales"."id" ASC LIMIT 1
32010
+ Rendered text template (0.0ms)
32011
+ Completed 404 Not Found in 17ms (Views: 10.0ms | ActiveRecord: 0.2ms)
32012
+  (0.3ms) rollback transaction
32013
+  (0.0ms) begin transaction
32014
+  (0.0ms) SAVEPOINT active_record_1
32015
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-6' LIMIT 1
32016
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.756510"], ["name", "Foo"], ["permalink", "foo-6"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.756510"]]
32017
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32018
+  (0.0ms) SAVEPOINT active_record_1
32019
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-7' LIMIT 1
32020
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.759145"], ["name", "Foo"], ["permalink", "foo-7"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.759145"]]
32021
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32022
+  (0.0ms) SAVEPOINT active_record_1
32023
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32024
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32025
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'mmsrc6' LIMIT 1
32026
+ 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:16:39.762401"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "mmsrc6"], ["product_id", 2], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:16:39.762401"]]
32027
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32028
+ Processing by Payola::TransactionsController#status as HTML
32029
+ Parameters: {"guid"=>"mmsrc6"}
32030
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."guid" = 'mmsrc6' ORDER BY "payola_sales"."id" ASC LIMIT 1
32031
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
32032
+  (0.6ms) rollback transaction
32033
+  (0.0ms) begin transaction
32034
+  (0.0ms) SAVEPOINT active_record_1
32035
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-8' LIMIT 1
32036
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.769708"], ["name", "Foo"], ["permalink", "foo-8"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.769708"]]
32037
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32038
+ Processing by Payola::TransactionsController#create as HTML
32039
+ Parameters: {"product_class"=>"product", "permalink"=>"foo-8"}
32040
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."permalink" = 'foo-8' LIMIT 1
32041
+ Payola::Coupon Load (0.1ms) SELECT "payola_coupons".* FROM "payola_coupons" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_coupons"."id" ASC LIMIT 1
32042
+ Payola::Affiliate Load (0.1ms) SELECT "payola_affiliates".* FROM "payola_affiliates" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_affiliates"."id" ASC LIMIT 1
32043
+ Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.2ms)
32044
+  (0.4ms) rollback transaction
32045
+  (0.1ms) begin transaction
32046
+  (0.0ms) SAVEPOINT active_record_1
32047
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-9' LIMIT 1
32048
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.779725"], ["name", "Foo"], ["permalink", "foo-9"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.779725"]]
32049
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32050
+ Processing by Payola::TransactionsController#create as HTML
32051
+ Parameters: {"product_class"=>"product", "permalink"=>"foo-9"}
32052
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."permalink" = 'foo-9' LIMIT 1
32053
+ Payola::Coupon Load (0.1ms) SELECT "payola_coupons".* FROM "payola_coupons" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_coupons"."id" ASC LIMIT 1
32054
+ Payola::Affiliate Load (0.1ms) SELECT "payola_affiliates".* FROM "payola_affiliates" WHERE (lower(code) = lower(NULL)) ORDER BY "payola_affiliates"."id" ASC LIMIT 1
32055
+ Completed 400 Bad Request in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms)
32056
+  (0.5ms) rollback transaction
32057
+  (0.0ms) begin transaction
32058
+  (0.1ms) SAVEPOINT active_record_1
32059
+ Product Exists (0.2ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-10' LIMIT 1
32060
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.788717"], ["name", "Foo"], ["permalink", "foo-10"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.788717"]]
32061
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32062
+  (0.1ms) SAVEPOINT active_record_1
32063
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-11' LIMIT 1
32064
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.792088"], ["name", "Foo"], ["permalink", "foo-11"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.792088"]]
32065
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32066
+  (0.0ms) SAVEPOINT active_record_1
32067
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32068
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32069
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'jhrrqa' LIMIT 1
32070
+ 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:16:39.796167"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "jhrrqa"], ["product_id", 2], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:16:39.796167"]]
32071
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32072
+ Processing by Payola::TransactionsController#show as HTML
32073
+ Parameters: {"guid"=>"jhrrqa"}
32074
+ Payola::Sale Load (0.2ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."guid" = 'jhrrqa' LIMIT 1
32075
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 2]]
32076
+ Redirected to http://test.host/
32077
+ Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
32078
+  (0.6ms) rollback transaction
32079
+  (0.1ms) begin transaction
32080
+  (0.1ms) rollback transaction
32081
+  (0.0ms) begin transaction
32082
+  (0.0ms) rollback transaction
32083
+  (0.0ms) begin transaction
32084
+  (0.0ms) rollback transaction
32085
+  (0.0ms) begin transaction
32086
+  (0.0ms) rollback transaction
32087
+  (0.0ms) begin transaction
32088
+  (0.0ms) rollback transaction
32089
+  (0.0ms) begin transaction
32090
+  (0.0ms) rollback transaction
32091
+  (0.0ms) begin transaction
32092
+  (0.1ms) SAVEPOINT active_record_1
32093
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-12' LIMIT 1
32094
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.815282"], ["name", "Foo"], ["permalink", "foo-12"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.815282"]]
32095
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32096
+  (0.0ms) SAVEPOINT active_record_1
32097
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32098
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32099
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'cnqsa2' LIMIT 1
32100
+ 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:16:39.818088"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "cnqsa2"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:16:39.818088"]]
32101
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32102
+  (0.0ms) SAVEPOINT active_record_1
32103
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'errored' WHERE "payola_sales"."id" = 1
32104
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32105
+  (0.5ms) rollback transaction
32106
+  (0.0ms) begin transaction
32107
+  (0.0ms) SAVEPOINT active_record_1
32108
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-13' LIMIT 1
32109
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.824164"], ["name", "Foo"], ["permalink", "foo-13"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.824164"]]
32110
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32111
+  (0.0ms) SAVEPOINT active_record_1
32112
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32113
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32114
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '5p6b7r' LIMIT 1
32115
+ 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:16:39.827069"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "5p6b7r"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:16:39.827069"]]
32116
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32117
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = '5p6b7r' AND "payola_sales"."id" != 1) LIMIT 1
32118
+  (0.1ms) SAVEPOINT active_record_1
32119
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-14' LIMIT 1
32120
+ SQL (0.1ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.875682"], ["name", "Foo"], ["permalink", "foo-14"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.875682"]]
32121
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32122
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '5p6b7r' LIMIT 1
32123
+  (0.6ms) rollback transaction
32124
+  (0.1ms) begin transaction
32125
+  (0.0ms) SAVEPOINT active_record_1
32126
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-15' LIMIT 1
32127
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.892630"], ["name", "Foo"], ["permalink", "foo-15"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.892630"]]
32128
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32129
+  (0.0ms) SAVEPOINT active_record_1
32130
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32131
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32132
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'p4bpu7' LIMIT 1
32133
+ 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:16:39.895345"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "p4bpu7"], ["product_id", 1], ["product_type", "Product"], ["state", "finished"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:16:39.895345"]]
32134
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32135
+  (0.0ms) SAVEPOINT active_record_1
32136
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'refunded' WHERE "payola_sales"."id" = 1
32137
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32138
+  (0.5ms) rollback transaction
32139
+  (0.0ms) begin transaction
32140
+  (0.1ms) SAVEPOINT active_record_1
32141
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-16' LIMIT 1
32142
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.901750"], ["name", "Foo"], ["permalink", "foo-16"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.901750"]]
32143
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32144
+  (0.0ms) SAVEPOINT active_record_1
32145
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32146
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32147
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'a2rmqh' LIMIT 1
32148
+ 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:16:39.904528"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "a2rmqh"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:16:39.904528"]]
32149
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32150
+  (0.0ms) SAVEPOINT active_record_1
32151
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
32152
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32153
+  (0.5ms) rollback transaction
32154
+  (0.0ms) begin transaction
32155
+  (0.0ms) SAVEPOINT active_record_1
32156
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-17' LIMIT 1
32157
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.910460"], ["name", "Foo"], ["permalink", "foo-17"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.910460"]]
32158
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32159
+  (0.0ms) SAVEPOINT active_record_1
32160
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32161
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32162
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'flpvs8' LIMIT 1
32163
+ 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:16:39.914189"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "flpvs8"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:16:39.914189"]]
32164
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32165
+  (0.1ms) SAVEPOINT active_record_1
32166
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'processing' WHERE "payola_sales"."id" = 1
32167
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32168
+  (0.5ms) rollback transaction
32169
+  (0.1ms) begin transaction
32170
+  (0.1ms) SAVEPOINT active_record_1
32171
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-18' LIMIT 1
32172
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.921879"], ["name", "Foo"], ["permalink", "foo-18"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.921879"]]
32173
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32174
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32175
+  (0.5ms) rollback transaction
32176
+  (0.1ms) begin transaction
32177
+  (0.0ms) SAVEPOINT active_record_1
32178
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-19' LIMIT 1
32179
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.928018"], ["name", "Foo"], ["permalink", "foo-19"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.928018"]]
32180
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32181
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32182
+  (0.3ms) rollback transaction
32183
+  (0.0ms) begin transaction
32184
+  (0.0ms) SAVEPOINT active_record_1
32185
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-20' LIMIT 1
32186
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.932674"], ["name", "Foo"], ["permalink", "foo-20"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.932674"]]
32187
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32188
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32189
+  (0.4ms) rollback transaction
32190
+  (0.1ms) begin transaction
32191
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32192
+  (0.1ms) rollback transaction
32193
+  (0.0ms) begin transaction
32194
+  (0.1ms) SAVEPOINT active_record_1
32195
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-21' LIMIT 1
32196
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.940832"], ["name", "Foo"], ["permalink", "foo-21"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.940832"]]
32197
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32198
+  (0.0ms) SAVEPOINT active_record_1
32199
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32200
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32201
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'ra3jv6' LIMIT 1
32202
+ 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:16:39.943509"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "ra3jv6"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:16:39.943509"]]
32203
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32204
+  (0.0ms) SAVEPOINT active_record_1
32205
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'ra3jv6' AND "payola_sales"."id" != 1) LIMIT 1
32206
+ 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:16:39.945338"]]
32207
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32208
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32209
+  (0.6ms) rollback transaction
32210
+  (0.1ms) begin transaction
32211
+  (0.1ms) SAVEPOINT active_record_1
32212
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-22' LIMIT 1
32213
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:39.950917"], ["name", "Foo"], ["permalink", "foo-22"], ["price", 100], ["updated_at", "2014-11-03 21:16:39.950917"]]
32214
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32215
+  (0.0ms) SAVEPOINT active_record_1
32216
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32217
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32218
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'ga4vf5' LIMIT 1
32219
+ 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:16:39.954806"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "ga4vf5"], ["product_id", 1], ["product_type", "Product"], ["state", "pending"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:16:39.954806"]]
32220
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32221
+  (0.0ms) SAVEPOINT active_record_1
32222
+ SQL (0.1ms) INSERT INTO "owners" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-03 21:16:39.958846"], ["updated_at", "2014-11-03 21:16:39.958846"]]
32223
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32224
+  (0.0ms) SAVEPOINT active_record_1
32225
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'ga4vf5' AND "payola_sales"."id" != 1) LIMIT 1
32226
+ 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:16:39.963045"]]
32227
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32228
+  (0.6ms) rollback transaction
32229
+  (0.1ms) begin transaction
32230
+ Payola::StripeWebhook Exists (0.1ms) SELECT 1 AS one FROM "payola_stripe_webhooks" WHERE "payola_stripe_webhooks"."stripe_id" = 'test_id' LIMIT 1
32231
+  (0.1ms) rollback transaction
32232
+  (0.0ms) begin transaction
32233
+  (0.0ms) SAVEPOINT active_record_1
32234
+ Payola::StripeWebhook Exists (0.1ms) SELECT 1 AS one FROM "payola_stripe_webhooks" WHERE "payola_stripe_webhooks"."stripe_id" = 'test_id' LIMIT 1
32235
+ SQL (0.2ms) INSERT INTO "payola_stripe_webhooks" ("created_at", "stripe_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-03 21:16:39.972309"], ["stripe_id", "test_id"], ["updated_at", "2014-11-03 21:16:39.972309"]]
32236
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32237
+ Payola::StripeWebhook Exists (0.1ms) SELECT 1 AS one FROM "payola_stripe_webhooks" WHERE "payola_stripe_webhooks"."stripe_id" = 'test_id' LIMIT 1
32238
+  (0.4ms) rollback transaction
32239
+  (0.1ms) begin transaction
32240
+  (0.0ms) rollback transaction
32241
+  (0.0ms) begin transaction
32242
+  (0.0ms) rollback transaction
32243
+  (0.0ms) begin transaction
32244
+  (0.1ms) rollback transaction
32245
+  (0.1ms) begin transaction
32246
+  (0.1ms) rollback transaction
32247
+  (0.1ms) begin transaction
32248
+  (0.1ms) rollback transaction
32249
+  (0.1ms) begin transaction
32250
+  (0.1ms) rollback transaction
32251
+  (0.0ms) begin transaction
32252
+  (0.1ms) rollback transaction
32253
+  (0.0ms) begin transaction
32254
+  (0.0ms) rollback transaction
32255
+  (0.0ms) begin transaction
32256
+  (0.0ms) rollback transaction
32257
+  (0.0ms) begin transaction
32258
+  (0.0ms) rollback transaction
32259
+  (0.0ms) begin transaction
32260
+  (0.0ms) rollback transaction
32261
+  (0.0ms) begin transaction
32262
+  (0.0ms) rollback transaction
32263
+  (0.0ms) begin transaction
32264
+  (0.0ms) rollback transaction
32265
+  (0.0ms) begin transaction
32266
+  (0.0ms) rollback transaction
32267
+  (0.0ms) begin transaction
32268
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-24' LIMIT 1
32269
+  (0.1ms) rollback transaction
32270
+  (0.0ms) begin transaction
32271
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-25' LIMIT 1
32272
+  (0.0ms) rollback transaction
32273
+  (0.0ms) begin transaction
32274
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'f' LIMIT 1
32275
+  (0.1ms) rollback transaction
32276
+  (0.0ms) begin transaction
32277
+  (0.0ms) rollback transaction
32278
+  (0.0ms) begin transaction
32279
+  (0.0ms) rollback transaction
32280
+  (0.0ms) begin transaction
32281
+  (0.0ms) rollback transaction
32282
+  (0.0ms) begin transaction
32283
+  (0.0ms) rollback transaction
32284
+  (0.0ms) begin transaction
32285
+  (0.0ms) SAVEPOINT active_record_1
32286
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-26' LIMIT 1
32287
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:40.019776"], ["name", "Foo"], ["permalink", "foo-26"], ["price", 100], ["updated_at", "2014-11-03 21:16:40.019776"]]
32288
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32289
+  (0.0ms) SAVEPOINT active_record_1
32290
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32291
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32292
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'io708n' LIMIT 1
32293
+ 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:16:40.022473"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "io708n"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:16:40.022473"]]
32294
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32295
+  (0.0ms) SAVEPOINT active_record_1
32296
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'io708n' AND "payola_sales"."id" != 1) LIMIT 1
32297
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32298
+  (0.0ms) SAVEPOINT active_record_1
32299
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'io708n' AND "payola_sales"."id" != 1) LIMIT 1
32300
+ 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:16:40.026468"]]
32301
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32302
+  (0.0ms) SAVEPOINT active_record_1
32303
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
32304
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32305
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32306
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32307
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32308
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32309
+  (0.6ms) rollback transaction
32310
+  (0.1ms) begin transaction
32311
+  (0.1ms) SAVEPOINT active_record_1
32312
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-27' LIMIT 1
32313
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:40.032809"], ["name", "Foo"], ["permalink", "foo-27"], ["price", 100], ["updated_at", "2014-11-03 21:16:40.032809"]]
32314
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32315
+  (0.0ms) SAVEPOINT active_record_1
32316
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32317
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32318
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '8p76q4' LIMIT 1
32319
+ 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:16:40.035471"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "8p76q4"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:16:40.035471"]]
32320
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32321
+  (0.1ms) SAVEPOINT active_record_1
32322
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = '8p76q4' AND "payola_sales"."id" != 1) LIMIT 1
32323
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32324
+  (0.1ms) SAVEPOINT active_record_1
32325
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = '8p76q4' AND "payola_sales"."id" != 1) LIMIT 1
32326
+ 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:16:40.041395"]]
32327
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32328
+  (0.1ms) SAVEPOINT active_record_1
32329
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
32330
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32331
+ Payola::Sale Load (0.1ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32332
+  (0.5ms) rollback transaction
32333
+  (0.1ms) begin transaction
32334
+  (0.0ms) SAVEPOINT active_record_1
32335
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-28' LIMIT 1
32336
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:40.047992"], ["name", "Foo"], ["permalink", "foo-28"], ["price", 100], ["updated_at", "2014-11-03 21:16:40.047992"]]
32337
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32338
+  (0.0ms) SAVEPOINT active_record_1
32339
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32340
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32341
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = 'efkesc' LIMIT 1
32342
+ 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:16:40.051107"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "efkesc"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:16:40.051107"]]
32343
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32344
+  (0.0ms) SAVEPOINT active_record_1
32345
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'efkesc' AND "payola_sales"."id" != 1) LIMIT 1
32346
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32347
+  (0.0ms) SAVEPOINT active_record_1
32348
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = 'efkesc' AND "payola_sales"."id" != 1) LIMIT 1
32349
+ 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:16:40.055112"]]
32350
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32351
+  (0.1ms) SAVEPOINT active_record_1
32352
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'finished' WHERE "payola_sales"."id" = 1
32353
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32354
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32355
+  (0.6ms) rollback transaction
32356
+  (0.0ms) begin transaction
32357
+  (0.0ms) SAVEPOINT active_record_1
32358
+ Product Exists (0.1ms) SELECT 1 AS one FROM "products" WHERE "products"."permalink" = 'foo-29' LIMIT 1
32359
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "permalink", "price", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-03 21:16:40.061015"], ["name", "Foo"], ["permalink", "foo-29"], ["price", 100], ["updated_at", "2014-11-03 21:16:40.061015"]]
32360
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32361
+  (0.0ms) SAVEPOINT active_record_1
32362
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32363
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" IS NULL LIMIT 1
32364
+ Payola::Sale Exists (0.0ms) SELECT 1 AS one FROM "payola_sales" WHERE "payola_sales"."guid" = '6ge8f0' LIMIT 1
32365
+ 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:16:40.063585"], ["currency", "usd"], ["email", "test@example.com"], ["guid", "6ge8f0"], ["product_id", 1], ["product_type", "Product"], ["state", "processing"], ["stripe_token", "tok_test"], ["updated_at", "2014-11-03 21:16:40.063585"]]
32366
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32367
+  (0.0ms) SAVEPOINT active_record_1
32368
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = '6ge8f0' AND "payola_sales"."id" != 1) LIMIT 1
32369
+  (0.1ms) RELEASE SAVEPOINT active_record_1
32370
+  (0.0ms) SAVEPOINT active_record_1
32371
+ Payola::Sale Exists (0.1ms) SELECT 1 AS one FROM "payola_sales" WHERE ("payola_sales"."guid" = '6ge8f0' AND "payola_sales"."id" != 1) LIMIT 1
32372
+ 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:16:40.067612"]]
32373
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32374
+  (0.1ms) SAVEPOINT active_record_1
32375
+ SQL (0.1ms) UPDATE "payola_sales" SET "state" = 'errored' WHERE "payola_sales"."id" = 1
32376
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32377
+ Payola::Sale Load (0.0ms) SELECT "payola_sales".* FROM "payola_sales" WHERE "payola_sales"."id" = ? LIMIT 1 [["id", 1]]
32378
+  (0.6ms) rollback transaction
32379
+  (0.1ms) begin transaction
32380
+  (0.1ms) rollback transaction