effective_orders 5.9.1 → 5.9.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 460e5652f16e49b5751f29cecd6d1cd41f8b92c5d9cb10d36f8f7f863fad9ca5
4
- data.tar.gz: d2f4c23a86b09022a38779718232ebe2b5226c5e1ca03b9286a6cf6a3504564e
3
+ metadata.gz: 9c21ba05da7239366ba59d58f08bc997193192c6b9cb83c93caade90b61072bd
4
+ data.tar.gz: 965fe919c2c7a6537dd7b15427291cef1119c768ccd38cf1fdbcaf282b1fd95a
5
5
  SHA512:
6
- metadata.gz: cee63481230c23907ef97547657e402d566b09c0f030fb4bae984608f352ca9a7715beedf5ccc6b7cba9e0f3ef96c4f550dd55d9ca50d57d7051a3e173316143
7
- data.tar.gz: fee709031224ca9818f454f73c7781dfb1259ec1bca86938b6f31450f3d1dddb2d71ae1521ad8fc7d026c405cac078fe5cb81ab1a6a18b7b1c309a241c2d0e2e
6
+ metadata.gz: 344e2cdaa0de66f512335a2c9da024de369713f34c84480a1b813b59874343bc4fc2ac81579f35ce718153346eb9e53826f46e657a5def99a6ff266b0f0aa45e
7
+ data.tar.gz: 51f49f85b475d26fea9cfc593f627ed4e1c1761075d6fb508264419246485035995272e638da63cb5ed99635a9d7ff4b1aad0c1c34b8bc7c385e26eda737f069
@@ -20,6 +20,21 @@ module Admin
20
20
  message
21
21
  }
22
22
 
23
+ def create
24
+ @order = Effective::Order.new
25
+ @order.assign_attributes(permitted_params)
26
+
27
+ authorize_effective_order!
28
+
29
+ @page_title ||= 'New Order'
30
+
31
+ if save_resource(@order, :pending)
32
+ respond_with_success(@order, :save)
33
+ else
34
+ respond_with_error(@order, :save)
35
+ end
36
+ end
37
+
23
38
  # The show page posts to this action
24
39
  # See Effective::OrdersController checkout
25
40
  def checkout
@@ -3,12 +3,12 @@
3
3
  class EffectiveOrdersDatatable < Effective::Datatable
4
4
  filters do
5
5
  unless attributes[:not_purchased]
6
- scope :purchased, default: true
6
+ scope :all
7
+ scope :purchased
7
8
 
8
9
  scope :deferred if EffectiveOrders.deferred_providers.present?
9
10
  scope :refunds if EffectiveOrders.refund
10
-
11
- scope :all
11
+ scope :not_purchased
12
12
  end
13
13
  end
14
14
 
@@ -499,7 +499,10 @@ module Effective
499
499
  self.addresses.clear if addresses.any? { |address| address.valid? == false }
500
500
  save!
501
501
 
502
- send_payment_request_to_buyer! if send_payment_request_to_buyer?
502
+ if send_payment_request_to_buyer?
503
+ after_commit { send_payment_request_to_buyer! }
504
+ end
505
+
503
506
  true
504
507
  end
505
508
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '5.9.1'.freeze
2
+ VERSION = '5.9.3'.freeze
3
3
  end
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: 5.9.1
4
+ version: 5.9.3
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: 2022-11-09 00:00:00.000000000 Z
11
+ date: 2022-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails