effective_orders 1.7.5 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1db077ab20eb5568aa64c528070b2810a5f5b224
4
- data.tar.gz: 584ecf99cd68e00bdf9acc49ccd93713cf67ab34
3
+ metadata.gz: 620fed45e324ddd47e54d737c2bc737e9eeec797
4
+ data.tar.gz: e7bf75ddee55b77e04ce2ae897b92d9f5b8b52dc
5
5
  SHA512:
6
- metadata.gz: a9174f05598c3d56caea8c496ffeb89c3af73918edbd219e874d4709b109069e950105d821a529f08c921f6d8074f02485de3eaa4e13f91b652871e511d9c164
7
- data.tar.gz: 92abf870e94ab56fdeb8689443f879cad2c297d11b7d95946715b9befd49a1464ac0fb339d8ec1d0f9d3f0edc0ec42763ad6af603b86ad3d4a90f1be93c34d80
6
+ metadata.gz: 7293cfe64c1d8b4690038c61356b2861109cbfcaa055324f452f3c699247e14b8415ff6aee20ba131cd5f9fc97943213273d5cffce09b60a1b7da77b79931fd7
7
+ data.tar.gz: 071870737b47f189d6759ffecad0230c31dbc9b1577bce69e21d8d203d27d915fc8078ab06518e9af11279836151ef9f48b7746344f6142f8ffcdf1e585aa913
data/README.md CHANGED
@@ -934,6 +934,79 @@ This process should be very similar although you'll create and configure a selle
934
934
  You should generate separate private and public certificates/keys for this and it is advisable to not keep production certificates/keys in version control.
935
935
 
936
936
 
937
+ ## Paying Using App Currency or Logic
938
+
939
+ There are situations when you want to handle payment logic inside your application. For example, an app could
940
+ have it's own type of currency (tokens, points, kudos) that could be used to make payments.
941
+
942
+ Let's look at a sample app checkout configuration to see how to get this kind of checkout working:
943
+
944
+ ```ruby
945
+ config.app_checkout_enabled = true
946
+
947
+ config.app_checkout = {
948
+ checkout_label: 'Checkout with Tokens',
949
+ service: TokenCheckoutService,
950
+ declined_flash: "Payment was unsuccessful. Please try again."
951
+ }
952
+ ```
953
+
954
+ First, decide on a checkout button label (this is only used when there's more than one checkout option available).
955
+ Other checkout buttons follow the pattern of "Checkout with \_\_\_", like "Checkout with Moneris".
956
+
957
+ Second, create a service object in your app and add a reference to it here ([see below for details](#the-app-checkout-service-object)).
958
+
959
+ The last configuration option is the declined flash message displayed when the `successful?` method
960
+ returns `false`.
961
+
962
+ Finally, *the app checkout button is hidden* unless effective orders receives authorzation to
963
+ display it. This is helpful if certain users don't use the in-app currency or in-app checkout.
964
+ To authorize effective orders and display the button, you should make sure that the effective
965
+ orders `authorization_method`, defined earlier in the config file, returns `true` if the three
966
+ arguments are: An instance of `Effective::OrdersController`, the Symbol `:app_checkout`, and the
967
+ instance of `Effective::Order`.
968
+
969
+ ### The App Checkout Service Object
970
+
971
+ The app checkout [service object](http://stevelorek.com/service-objects.html) is responsible for containing
972
+ the businiess logic of in-app payments (i.e. with tokens).
973
+
974
+ There are two recommended ways to implement the service object:
975
+
976
+ 1. Create a service object that inherits from `EffectiveOrders::AppCheckoutService`
977
+ 2. Use the [interactor gem](https://github.com/collectiveidea/interactor) (interactor is just another
978
+ term for service object)
979
+
980
+ Here's a sample service object (and likely the minimal implementation that you'll want):
981
+
982
+ ```ruby
983
+ # located in /app/services/token_checkout_service.rb
984
+
985
+ # Instances of this class have access to the Effective::Order object in the instance variable, @order.
986
+ class TokenCheckoutService < EffectiveOrders::AppCheckoutService
987
+ # This method is responsible to complete the payment transaction
988
+ def call
989
+ cost_in_tokens = Token.cost_in_tokens(@order.price)
990
+ @order.user.tokens = @order.user.tokens - cost_in_tokens
991
+ @success = @order.user.save
992
+ end
993
+
994
+ # Did the purchase finish correctly?
995
+ def successful?
996
+ @success
997
+ end
998
+
999
+ # - optional -
1000
+ # return a Hash or easily serializable object like a String
1001
+ #
1002
+ # The return value of this method will be serialized and stored on the `payment_details` attribute
1003
+ # of the `Effective::Order`.
1004
+ def payment_details
1005
+ end
1006
+ end
1007
+ ```
1008
+
1009
+
937
1010
  ## License
938
1011
 
939
1012
  MIT License. Copyright [Code and Effect Inc.](http://www.codeandeffect.com/)
@@ -6,6 +6,7 @@ module Effective
6
6
  include Providers::Paypal if EffectiveOrders.paypal_enabled
7
7
  include Providers::Stripe if EffectiveOrders.stripe_enabled
8
8
  include Providers::StripeConnect if EffectiveOrders.stripe_connect_enabled
9
+ include Providers::AppCheckout if EffectiveOrders.app_checkout_enabled
9
10
 
10
11
  layout (EffectiveOrders.layout.kind_of?(Hash) ? EffectiveOrders.layout[:orders] : EffectiveOrders.layout)
11
12
 
@@ -158,10 +159,13 @@ module Effective
158
159
  end
159
160
  end
160
161
 
161
- def order_declined(details = nil, redirect_url = nil)
162
- @order.decline!(details) rescue nil
162
+ # options:
163
+ # flash: What flash message should be displayed
164
+ def order_declined(details = nil, redirect_url = nil, options = {})
165
+ flash = options.fetch(:flash, "Payment was unsuccessful. Your credit card was declined by the payment processor. Please try again.")
163
166
 
164
- flash[:danger] = "Payment was unsuccessful. Your credit card was declined by the payment processor. Please try again."
167
+ @order.decline!(details) rescue nil
168
+ flash[:danger] = flash
165
169
 
166
170
  redirect_to (redirect_url.presence || effective_orders.order_declined_path(@order)).gsub(':id', @order.id.to_s)
167
171
  end
@@ -0,0 +1,28 @@
1
+ module Effective
2
+ module Providers
3
+ module AppCheckout
4
+ extend ActiveSupport::Concern
5
+
6
+ def app_checkout
7
+ @order = Order.find(params[:id])
8
+ checkout = EffectiveOrders.app_checkout[:service].call(order: @order)
9
+ if checkout.success?
10
+ order_purchased(payment_details(checkout))
11
+ else
12
+ flash = EffectiveOrders.app_checkout[:declined_flash]
13
+ order_declined(payment_details(checkout), nil, flash: flash)
14
+ end
15
+ end
16
+
17
+ def payment_details(checkout)
18
+ default = 'App Checkout'
19
+ if checkout.respond_to?(:payment_details)
20
+ checkout.payment_details.presence || default
21
+ else
22
+ default
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+
@@ -41,6 +41,8 @@ module EffectiveOrdersHelper
41
41
  EffectiveOrders.allow_pretend_purchase_in_production ? 'Purchase Order' : 'Purchase Order (development only)'
42
42
  when :stripe
43
43
  'Checkout with Stripe'
44
+ when :app_checkout
45
+ EffectiveOrders.app_checkout[:checkout_label]
44
46
  else
45
47
  'Checkout'
46
48
  end
@@ -16,6 +16,10 @@
16
16
  - if EffectiveOrders.stripe_enabled
17
17
  = render :partial => '/effective/orders/stripe/form', locals: {order: order}
18
18
 
19
+ - if EffectiveOrders.authorized?(controller, :app_checkout, order)
20
+ - if EffectiveOrders.app_checkout_enabled
21
+ = render :partial => '/effective/orders/app_checkout/form', locals: {order: order}
22
+
19
23
  - if (Rails.env.production? == true && EffectiveOrders.allow_pretend_purchase_in_production)
20
24
  %p= EffectiveOrders.allow_pretend_purchase_in_production_message
21
25
 
@@ -0,0 +1,2 @@
1
+ = form_tag(effective_orders.app_checkout_path(order), method: :post) do
2
+ = submit_tag order_checkout_label(:app_checkout), :class => 'btn btn-primary', :data => {'disable_with' => 'Continuing...' }
data/config/routes.rb CHANGED
@@ -31,6 +31,10 @@ EffectiveOrders::Engine.routes.draw do
31
31
  match 'orders/my_sales', :to => 'orders#my_sales', :as => 'my_sales', :via => :get
32
32
  end
33
33
 
34
+ if EffectiveOrders.app_checkout_enabled
35
+ match 'orders/:id/app_checkout', :to => 'orders#app_checkout', :as => 'app_checkout', :via => :post
36
+ end
37
+
34
38
  if (Rails.env.development? || Rails.env.test?) || EffectiveOrders.allow_pretend_purchase_in_production
35
39
  match 'orders/:id/pretend_purchase', :to => 'orders#pretend_purchase', :as => 'pretend_purchase', :via => [:get, :post]
36
40
  end
@@ -5,6 +5,7 @@ require 'effective_addresses'
5
5
  require 'effective_obfuscation'
6
6
  require 'effective_orders/engine'
7
7
  require 'effective_orders/version'
8
+ require 'effective_orders/app_checkout_service'
8
9
 
9
10
  module EffectiveOrders
10
11
  PURCHASED = 'purchased'
@@ -46,6 +47,7 @@ module EffectiveOrders
46
47
 
47
48
  mattr_accessor :paypal_enabled
48
49
  mattr_accessor :moneris_enabled
50
+ mattr_accessor :app_checkout_enabled
49
51
 
50
52
  mattr_accessor :show_order_history_button
51
53
 
@@ -61,6 +63,7 @@ module EffectiveOrders
61
63
  mattr_accessor :paypal
62
64
  mattr_accessor :moneris
63
65
  mattr_accessor :stripe
66
+ mattr_accessor :app_checkout
64
67
 
65
68
  mattr_accessor :deliver_method
66
69
 
@@ -89,7 +92,7 @@ module EffectiveOrders
89
92
  end
90
93
 
91
94
  def self.single_payment_processor?
92
- [moneris_enabled, paypal_enabled, stripe_enabled].select { |enabled| enabled }.length == 1
95
+ [moneris_enabled, paypal_enabled, stripe_enabled, app_checkout_enabled].select { |enabled| enabled }.length == 1
93
96
  end
94
97
 
95
98
  class SoldOutException < Exception; end
@@ -0,0 +1,27 @@
1
+ module EffectiveOrders
2
+ class AppCheckoutService
3
+ def self.call(options = {})
4
+ order = options[:order]
5
+ new(order).tap(&:call)
6
+ end
7
+
8
+ attr_reader :order
9
+
10
+ def initialize(order)
11
+ @order = order
12
+ end
13
+
14
+ def call
15
+ raise NotImplementedError, "overwrite the `call` instance method in #{self.class}"
16
+ end
17
+
18
+ def success?
19
+ raise NotImplementedError, "overwrite the `success?` instance method in #{self.class}"
20
+ end
21
+
22
+ # A Hash or easily serializable object like a String
23
+ def payment_details
24
+ end
25
+ end
26
+ end
27
+
@@ -90,6 +90,22 @@ module EffectiveOrders
90
90
  end
91
91
  end
92
92
 
93
+ initializer 'effective_orders.app_checkout_config_validation', :after => :load_config_initializers do
94
+ if EffectiveOrders.app_checkout_enabled
95
+ unless EffectiveOrders.app_checkout.is_a?(Hash)
96
+ raise ArgumentError, "expected EffectiveOrders.app_checkout to be a Hash but it is a #{EffectiveOrders.app_checkout.class}"
97
+ end
98
+ missing = EffectiveOrders.app_checkout.select {|_config, value| value.blank? }
99
+ missing = missing | [:service] unless EffectiveOrders.app_checkout.has_key?(:service)
100
+
101
+ raise "Missing effective_orders App Checkout configuration values: #{missing.keys.join(', ')}" if missing.present?
102
+ unless EffectiveOrders.app_checkout[:service].respond_to?(:call)
103
+ msg = "EffectiveOrders.app_checkout[:service] is not a compatible service object. Inherit from EffectiveOrders::AppCheckoutService or implement a similar API"
104
+ raise ArgumentError, msg
105
+ end
106
+ end
107
+ end
108
+
93
109
  # Use ActiveAdmin (optional)
94
110
  initializer 'effective_orders.active_admin' do
95
111
  if EffectiveOrders.use_active_admin?
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '1.7.5'.freeze
2
+ VERSION = '1.8.0'.freeze
3
3
  end
@@ -222,4 +222,12 @@ EffectiveOrders.setup do |config|
222
222
  }
223
223
  end
224
224
 
225
+ # App checkout configuration
226
+ config.app_checkout_enabled = false
227
+
228
+ config.app_checkout = {
229
+ checkout_label: '', # Checkout button to finalize the order
230
+ service: nil, # an EffectiveOrders::AppCheckout type object
231
+ declined_flash: "Payment was unsuccessful. Please try again."
232
+ }
225
233
  end
@@ -213,4 +213,12 @@ EffectiveOrders.setup do |config|
213
213
  }
214
214
  end
215
215
 
216
+ # App checkout configuration
217
+ config.app_checkout_enabled = false
218
+
219
+ config.app_checkout = {
220
+ checkout_label: '', # Checkout button to finalize the order
221
+ service: nil, # an EffectiveOrders::AppCheckout type object
222
+ declined_flash: "Payment was unsuccessful. Please try again."
223
+ }
216
224
  end
@@ -0,0 +1,82 @@
1
+  (1.2ms) CREATE TABLE "addresses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "addressable_type" varchar, "addressable_id" integer, "category" varchar(64), "full_name" varchar, "address1" varchar, "address2" varchar, "city" varchar, "state_code" varchar, "country_code" varchar, "postal_code" varchar, "updated_at" datetime, "created_at" datetime) 
2
+  (0.1ms) select sqlite_version(*)
3
+  (0.8ms) CREATE INDEX "index_addresses_on_addressable_id" ON "addresses" ("addressable_id")
4
+  (0.2ms) SELECT sql
5
+ FROM sqlite_master
6
+ WHERE name='index_addresses_on_addressable_id' AND type='index'
7
+ UNION ALL
8
+ SELECT sql
9
+ FROM sqlite_temp_master
10
+ WHERE name='index_addresses_on_addressable_id' AND type='index'
11
+
12
+  (0.9ms) CREATE INDEX "index_addresses_on_addressable_type_and_addressable_id" ON "addresses" ("addressable_type", "addressable_id")
13
+  (1.0ms) CREATE TABLE "cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "purchasable_type" varchar, "purchasable_id" integer, "quantity" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
14
+  (1.0ms) CREATE INDEX "index_cart_items_on_cart_id" ON "cart_items" ("cart_id")
15
+  (0.1ms) SELECT sql
16
+ FROM sqlite_master
17
+ WHERE name='index_cart_items_on_cart_id' AND type='index'
18
+ UNION ALL
19
+ SELECT sql
20
+ FROM sqlite_temp_master
21
+ WHERE name='index_cart_items_on_cart_id' AND type='index'
22
+
23
+  (1.0ms) CREATE INDEX "index_cart_items_on_purchasable_id" ON "cart_items" ("purchasable_id")
24
+  (0.1ms) SELECT sql
25
+ FROM sqlite_master
26
+ WHERE name='index_cart_items_on_purchasable_id' AND type='index'
27
+ UNION ALL
28
+ SELECT sql
29
+ FROM sqlite_temp_master
30
+ WHERE name='index_cart_items_on_purchasable_id' AND type='index'
31
+
32
+  (0.1ms)  SELECT sql
33
+ FROM sqlite_master
34
+ WHERE name='index_cart_items_on_cart_id' AND type='index'
35
+ UNION ALL
36
+ SELECT sql
37
+ FROM sqlite_temp_master
38
+ WHERE name='index_cart_items_on_cart_id' AND type='index'
39
+ 
40
+  (1.0ms) CREATE INDEX "index_cart_items_on_purchasable_type_and_purchasable_id" ON "cart_items" ("purchasable_type", "purchasable_id")
41
+  (0.9ms) CREATE TABLE "carts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
42
+  (0.8ms) CREATE INDEX "index_carts_on_user_id" ON "carts" ("user_id")
43
+  (0.9ms) CREATE TABLE "custom_products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar, "price" integer DEFAULT 0, "tax_exempt" boolean, "created_at" datetime, "updated_at" datetime) 
44
+  (1.0ms) CREATE TABLE "customers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "stripe_customer_id" varchar, "stripe_active_card" varchar, "stripe_connect_access_token" varchar, "created_at" datetime, "updated_at" datetime)
45
+  (1.0ms) CREATE TABLE "order_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "order_id" integer, "seller_id" integer, "purchasable_type" varchar, "purchasable_id" integer, "title" varchar, "quantity" integer, "price" integer DEFAULT 0, "tax_exempt" boolean, "tax_rate" decimal(5,3) DEFAULT 0.0, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
46
+  (0.9ms) CREATE INDEX "index_order_items_on_order_id" ON "order_items" ("order_id")
47
+  (0.1ms)  SELECT sql
48
+ FROM sqlite_master
49
+ WHERE name='index_order_items_on_order_id' AND type='index'
50
+ UNION ALL
51
+ SELECT sql
52
+ FROM sqlite_temp_master
53
+ WHERE name='index_order_items_on_order_id' AND type='index'
54
+ 
55
+  (0.9ms) CREATE INDEX "index_order_items_on_purchasable_id" ON "order_items" ("purchasable_id")
56
+  (0.1ms)  SELECT sql
57
+ FROM sqlite_master
58
+ WHERE name='index_order_items_on_purchasable_id' AND type='index'
59
+ UNION ALL
60
+ SELECT sql
61
+ FROM sqlite_temp_master
62
+ WHERE name='index_order_items_on_purchasable_id' AND type='index'
63
+ 
64
+  (0.1ms) SELECT sql
65
+ FROM sqlite_master
66
+ WHERE name='index_order_items_on_order_id' AND type='index'
67
+ UNION ALL
68
+ SELECT sql
69
+ FROM sqlite_temp_master
70
+ WHERE name='index_order_items_on_order_id' AND type='index'
71
+
72
+  (0.9ms) CREATE INDEX "index_order_items_on_purchasable_type_and_purchasable_id" ON "order_items" ("purchasable_type", "purchasable_id")
73
+  (0.9ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "purchase_state" varchar, "purchased_at" datetime, "payment" text, "details" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "note" text)
74
+  (0.9ms) CREATE INDEX "index_orders_on_user_id" ON "orders" ("user_id")
75
+  (1.1ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar, "price" integer DEFAULT 0, "tax_exempt" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
76
+  (0.9ms) CREATE TABLE "product_with_float_prices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar, "price" decimal DEFAULT 0, "tax_exempt" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
77
+  (1.0ms) CREATE TABLE "subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "customer_id" integer, "stripe_plan_id" varchar, "stripe_subscription_id" varchar, "stripe_coupon_id" varchar, "title" varchar, "price" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime)
78
+  (1.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "encrypted_password" varchar, "reset_password_token" varchar, "reset_password_sent_at" datetime, "remember_created_at" datetime, "confirmation_sent_at" datetime, "confirmed_at" datetime, "confirmation_token" varchar, "unconfirmed_email" varchar, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar, "last_sign_in_ip" varchar, "email" varchar, "roles_mask" integer DEFAULT 0, "archived" boolean DEFAULT 'f', "updated_at" datetime, "created_at" datetime) 
79
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
80
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
81
+  (0.1ms) SELECT version FROM "schema_migrations"
82
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('4')
@@ -207,3 +207,55 @@
207
207
   (0.4ms) SELECT MAX("orders"."id") FROM "orders"
208
208
   (0.3ms) SELECT MAX("orders"."id") FROM "orders"
209
209
   (0.4ms) SELECT MAX("orders"."id") FROM "orders"
210
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
211
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
212
+  (0.3ms) SELECT MAX("orders"."id") FROM "orders"
213
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
214
+  (0.3ms) SELECT MAX("orders"."id") FROM "orders"
215
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
216
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
217
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
218
+  (0.3ms) SELECT MAX("orders"."id") FROM "orders"
219
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
220
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
221
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
222
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
223
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
224
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
225
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
226
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
227
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
228
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
229
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
230
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
231
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
232
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
233
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
234
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
235
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
236
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
237
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
238
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
239
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
240
+  (0.3ms) SELECT MAX("orders"."id") FROM "orders"
241
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
242
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
243
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
244
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
245
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
246
+  (0.3ms) SELECT MAX("orders"."id") FROM "orders"
247
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
248
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
249
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
250
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
251
+  (0.4ms) SELECT MAX("orders"."id") FROM "orders"
252
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
253
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
254
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
255
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
256
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
257
+  (0.3ms) SELECT MAX("orders"."id") FROM "orders"
258
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
259
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
260
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
261
+  (0.2ms) SELECT MAX("orders"."id") FROM "orders"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_orders
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.5
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-08 00:00:00.000000000 Z
11
+ date: 2016-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -316,6 +316,7 @@ files:
316
316
  - app/controllers/concerns/acts_as_active_admin_controller.rb
317
317
  - app/controllers/effective/carts_controller.rb
318
318
  - app/controllers/effective/orders_controller.rb
319
+ - app/controllers/effective/providers/app_checkout.rb
319
320
  - app/controllers/effective/providers/moneris.rb
320
321
  - app/controllers/effective/providers/paypal.rb
321
322
  - app/controllers/effective/providers/stripe.rb
@@ -362,6 +363,7 @@ files:
362
363
  - app/views/effective/orders/_order_payment_details.html.haml
363
364
  - app/views/effective/orders/_order_shipping.html.haml
364
365
  - app/views/effective/orders/_order_user_fields.html.haml
366
+ - app/views/effective/orders/app_checkout/_form.html.haml
365
367
  - app/views/effective/orders/checkout.html.haml
366
368
  - app/views/effective/orders/declined.html.haml
367
369
  - app/views/effective/orders/moneris/_form.html.haml
@@ -386,6 +388,7 @@ files:
386
388
  - db/upgrade/02_upgrade_effective_orders_from03x.rb.erb
387
389
  - db/upgrade/upgrade_price_column_on_table.rb.erb
388
390
  - lib/effective_orders.rb
391
+ - lib/effective_orders/app_checkout_service.rb
389
392
  - lib/effective_orders/engine.rb
390
393
  - lib/effective_orders/version.rb
391
394
  - lib/generators/effective_orders/install_generator.rb
@@ -436,6 +439,7 @@ files:
436
439
  - spec/dummy/config/secrets.yml
437
440
  - spec/dummy/db/schema.rb
438
441
  - spec/dummy/db/test.sqlite3
442
+ - spec/dummy/log/development.log
439
443
  - spec/dummy/log/test.log
440
444
  - spec/dummy/public/404.html
441
445
  - spec/dummy/public/422.html
@@ -518,6 +522,7 @@ test_files:
518
522
  - spec/dummy/config.ru
519
523
  - spec/dummy/db/schema.rb
520
524
  - spec/dummy/db/test.sqlite3
525
+ - spec/dummy/log/development.log
521
526
  - spec/dummy/log/test.log
522
527
  - spec/dummy/public/404.html
523
528
  - spec/dummy/public/422.html