effective_orders 4.0.0beta3 → 4.0.0beta4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4c93ba62efdec37fd8c277afca2a28090303b8c
|
4
|
+
data.tar.gz: 8e89c28503192d4373aca8b13762ab8fede41744
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5013c1845227a4117f94eb1a7f414b0fa048ecf8e617da3dd82eee2ad16326246edc726877eb898ba0b97ccc739f8909373126d4b1162cb122f393a68bbc0ee3
|
7
|
+
data.tar.gz: 51328fba62557431d4ed163a67bb9c61996cb38cff150fb8706c9398b55aef69139b1264bcd1dac3028dba64583bf5833f4daa7695ca6a56d519566404d38d81
|
@@ -47,7 +47,7 @@ module EffectiveOrdersHelper
|
|
47
47
|
when :paypal
|
48
48
|
'Checkout with PayPal'
|
49
49
|
when :pretend
|
50
|
-
|
50
|
+
'Purchase Order (skip payment processor)'
|
51
51
|
when :refund
|
52
52
|
'Complete Refund'
|
53
53
|
when :stripe
|
@@ -30,10 +30,8 @@
|
|
30
30
|
- if EffectiveOrders.cheque? && order.user == current_user
|
31
31
|
= render partial: '/effective/orders/cheque/form', locals: provider_locals
|
32
32
|
|
33
|
-
|
34
|
-
|
35
|
-
%p= EffectiveOrders.pretend_purchase_in_production_message
|
36
|
-
|
33
|
+
- if EffectiveOrders.pretend? && EffectiveOrders.pretend_message.present?
|
34
|
+
%p.text-right= EffectiveOrders.pretend_message
|
37
35
|
|
38
36
|
- if EffectiveOrders.authorized?(controller, :admin, :effective_orders) && order.user != current_user
|
39
37
|
- if EffectiveOrders.refunds? && order.refund?
|
data/config/effective_orders.rb
CHANGED
@@ -103,23 +103,13 @@ EffectiveOrders.setup do |config|
|
|
103
103
|
# Refunds don't perform any kind of refund action with the payment processor. This just changes the validations.
|
104
104
|
config.refunds_enabled = false
|
105
105
|
|
106
|
-
# Pretend Purchase
|
106
|
+
# Pretend Purchase
|
107
107
|
# Display a 'Purchase order' button on the Checkout screen allowing the user
|
108
|
-
# to purchase an Order without going through the payment processor.
|
109
|
-
config.pretend_purchase_in_development_enabled = true
|
110
|
-
|
111
|
-
# Pretend Purchase in Production
|
108
|
+
# to purchase an Order without going through the payment processor.
|
112
109
|
# WARNING: Setting this option to true will allow users to purchase! an Order without entering a credit card
|
113
110
|
# WARNING: When true, users can purchase! anything without paying money
|
114
|
-
|
115
|
-
|
116
|
-
# where users may test the purchase workflow without actually paying money
|
117
|
-
#
|
118
|
-
# When true, there will be a 'Process Order' button on the Checkout screen.
|
119
|
-
# Clicking this button will mark an Order purchased and redirect the user to the
|
120
|
-
# Thank You page just as if they had successfully Checked Out through a payment processor
|
121
|
-
config.pretend_purchase_in_production_enabled = false
|
122
|
-
config.pretend_purchase_in_production_message = '* payment information is not required to process this order at this time.'
|
111
|
+
config.pretend_enabled = !Rails.env.production?
|
112
|
+
config.pretend_message = '* payment information is not required to process this order at this time.'
|
123
113
|
|
124
114
|
# Mailer Settings
|
125
115
|
# effective_orders will send out receipts to the buyer, seller and admins.
|
data/lib/effective_orders.rb
CHANGED
@@ -21,10 +21,6 @@ module EffectiveOrders
|
|
21
21
|
|
22
22
|
mattr_accessor :authorization_method
|
23
23
|
|
24
|
-
mattr_accessor :pretend_purchase_in_development_enabled
|
25
|
-
mattr_accessor :pretend_purchase_in_production_enabled
|
26
|
-
mattr_accessor :pretend_purchase_in_production_message
|
27
|
-
|
28
24
|
mattr_accessor :layout
|
29
25
|
mattr_accessor :mailer
|
30
26
|
|
@@ -47,9 +43,13 @@ module EffectiveOrders
|
|
47
43
|
mattr_accessor :terms_and_conditions_label
|
48
44
|
|
49
45
|
mattr_accessor :minimum_charge
|
46
|
+
|
47
|
+
# Features
|
50
48
|
mattr_accessor :free_enabled
|
51
49
|
mattr_accessor :mark_as_paid_enabled
|
52
50
|
mattr_accessor :refunds_enabled
|
51
|
+
mattr_accessor :pretend_enabled
|
52
|
+
mattr_accessor :pretend_message
|
53
53
|
|
54
54
|
# Payment processors. false or Hash
|
55
55
|
mattr_accessor :cheque
|
@@ -110,7 +110,7 @@ module EffectiveOrders
|
|
110
110
|
end
|
111
111
|
|
112
112
|
def self.pretend?
|
113
|
-
|
113
|
+
pretend_enabled == true
|
114
114
|
end
|
115
115
|
|
116
116
|
def self.refunds?
|
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: 4.0.
|
4
|
+
version: 4.0.0beta4
|
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: 2018-04-
|
11
|
+
date: 2018-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|