effective_orders 6.18.0 → 6.18.1

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: '0559a1dd68e0c43937ccf7a6e13c0f4e8f54c0bf79382744a360f5151b613340'
4
- data.tar.gz: 1ae3981f93b86d70bc6706b7688351d3ea555aa9700265e9dc62616eb449f96c
3
+ metadata.gz: 6262b10bfc94249e48f814919826183bf87c400c935216026cd59fb338d535b5
4
+ data.tar.gz: a8af8d39b083668d5ab638fe2815740e5700f74438211f03743ab73f623dda76
5
5
  SHA512:
6
- metadata.gz: 4e44abc94fabf240ca5d7c8d446c362f2aca1e59afffc55724753471499acec7fb9bf52d6e6a78469a7763f820c659dfb4a033a80bc09f6452d498fce9283b80
7
- data.tar.gz: c648c5762abbb8b39842e1424a78631e614128404ffe73859232bc350d619ba4df5a5da1e22f3632bf357b94b4a8dd66ece50d1b080272903f5b124a500684ed
6
+ metadata.gz: cc3b222c1b485fd6e466cead675af06331d332f41f8e0c6d643e8c6ad2a52bfd28a99385d114be29c64111167c695b965d487e74e7fc74dbc727bca3375249a2
7
+ data.tar.gz: b889564efa5f2e6e9babdb0fc61931175fc8d61aa4c166d5643f98d1afb2f0de325870265475ace6aa12bb0bb2978c2c61bf8a9b83274ff3971d487c657b08cc
@@ -59,7 +59,8 @@ module Effective
59
59
  mail(to: @order.emails, cc: @order.cc.presence, subject: subject, **headers)
60
60
  end
61
61
 
62
- # This is sent when someone chooses to Pay by Cheque
62
+ # This is sent when someone chooses to Pay by Cheque or Pay by E-transfer
63
+ # This is not automatically sent for a delayed purchase
63
64
  def pending_order_invoice_to_buyer(resource, opts = {})
64
65
  raise('expected an Effective::Order') unless resource.kind_of?(Effective::Order)
65
66
 
@@ -67,7 +68,9 @@ module Effective
67
68
  subject = subject_for(__method__, "Pending Order: ##{@order.to_param}", resource, opts)
68
69
  headers = headers_for(resource, opts)
69
70
 
70
- mail(to: @order.emails, cc: @order.cc.presence, subject: subject, **headers)
71
+ cc = (@order.cc.to_s.split(',') + [mailer_admin] - [nil, '', ' ']).compact.presence
72
+
73
+ mail(to: @order.emails, cc: cc, subject: subject, **headers)
71
74
  end
72
75
 
73
76
  # This is sent to admin when someone Accepts Refund
@@ -811,7 +811,7 @@ module Effective
811
811
 
812
812
  raise "Failed to defer order: #{error || errors.full_messages.to_sentence}" unless error.nil?
813
813
 
814
- send_payment_request_to_buyer! if email
814
+ send_pending_order_invoice_to_buyer! if email
815
815
 
816
816
  true
817
817
  end
@@ -2,12 +2,22 @@
2
2
 
3
3
  %p We have received notice of your intention to purchase the following items.
4
4
 
5
- %p Please remit payment at your earliest convenience.
5
+ - if @order.delayed?
6
+ %p{style: "margin-bottom: 4px; font-weight: bold;"} Please note:
7
+ %ul{style: "margin-top: 0;"}
8
+ %li Your credit card will be charged on <strong>#{@order.delayed_payment_date.strftime("%A, %B %d, %Y")}</strong>.
9
+ %li Changes and cancellations must be made before this date.
10
+ %li A receipt will be sent after the transaction is completed.
6
11
 
7
- %p #{link_to('Click here', effective_orders.order_url(@order))} to review your order online.
12
+ - elsif @order.deferred?
13
+ %p Please remit payment at your earliest convenience.
8
14
 
9
- - if EffectiveOrders.deferred_providers.present?
10
- - providers = EffectiveOrders.deferred_providers.to_sentence(last_word_connector: ', or', two_words_connector: ' or ')
11
- %p When we receive your #{providers} we will mark your order paid.
15
+ - if EffectiveOrders.deferred_providers.present?
16
+ - providers = EffectiveOrders.deferred_providers.to_sentence(last_word_connector: ', or', two_words_connector: ' or ')
17
+ %p When we receive your #{providers} we will mark your order paid.
12
18
 
13
19
  = render(@order, no_order_actions: true)
20
+
21
+ %hr
22
+ %p{style: "text-align: center;"}
23
+ = link_to('View your order', effective_orders.order_url(@order))
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '6.18.0'.freeze
2
+ VERSION = '6.18.1'.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: 6.18.0
4
+ version: 6.18.1
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: 2024-12-05 00:00:00.000000000 Z
11
+ date: 2024-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails