effective_orders 2.1.4 → 2.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/effective_orders_helper.rb +17 -0
- data/app/views/admin/orders/_order_payment_details.html.haml +3 -17
- data/app/views/effective/orders/_order.html.haml +1 -0
- data/app/views/effective/orders/_order_payment_details.html.haml +18 -0
- data/lib/effective_orders/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc912e7bf2fc4e12905abff50fab57ca0b8479eb
|
4
|
+
data.tar.gz: 8da57b67b1b09169180d2782e690d0dbdc69389f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbf1ba883263abc262431f857bed188b8f9de0653b93cb337ef0338b0773e537ff2d090a5c36b94d29f340b4e4e179263c2e12caff7dc420feada264256fc905
|
7
|
+
data.tar.gz: 29744efe4ccfdfe874b5ee905be298950d50dd59c9bdf3070df56751586e8bc9abd621c2a8bf2a2370452d3f7759fe41577e91c313b49accca2af0c3084b4be4
|
@@ -164,4 +164,21 @@ module EffectiveOrdersHelper
|
|
164
164
|
end
|
165
165
|
end
|
166
166
|
|
167
|
+
def payment_card_label(card)
|
168
|
+
case card.to_s.downcase[0]
|
169
|
+
when nil
|
170
|
+
'None'
|
171
|
+
when 'v'
|
172
|
+
'Visa'
|
173
|
+
when 'm'
|
174
|
+
'MasterCard'
|
175
|
+
when 'a'
|
176
|
+
'American Express'
|
177
|
+
when 'd'
|
178
|
+
'Discover'
|
179
|
+
else
|
180
|
+
card.to_s
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
167
184
|
end
|
@@ -1,19 +1,5 @@
|
|
1
|
-
- if order.purchased?
|
1
|
+
- if order.purchased? && order.payment.present?
|
2
2
|
.effective-order-payment-details
|
3
|
-
%h3 Payment Details
|
4
|
-
|
5
|
-
%tbody
|
6
|
-
%tr
|
7
|
-
%td Provider
|
8
|
-
%td= order.payment_provider
|
9
|
-
%tr
|
10
|
-
%td Card
|
11
|
-
%td= order.payment_card || 'none'
|
12
|
-
%tr
|
13
|
-
%td Purchased at
|
14
|
-
%td= order.purchased_at.strftime('%Y-%m-%d %H:%M')
|
15
|
-
- if order.payment.present?
|
16
|
-
%tr
|
17
|
-
%td Additional details
|
18
|
-
%td= tableize_order_payment(order.payment[:details] || order.payment, class: 'table')
|
3
|
+
%h3 Payment Provider Details
|
4
|
+
= tableize_order_payment(order.payment[:details] || order.payment, class: 'table')
|
19
5
|
|
@@ -7,5 +7,6 @@
|
|
7
7
|
= render partial: 'effective/orders/order_note', locals: {order: order}
|
8
8
|
= render partial: 'effective/orders/order_note_to_buyer', locals: {order: order}
|
9
9
|
= render partial: 'effective/orders/order_items', locals: {order: order}
|
10
|
+
= render partial: 'effective/orders/order_payment_details', locals: {order: order}
|
10
11
|
= render partial: 'effective/orders/order_footer', locals: {order: order}
|
11
12
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
- if order.purchased?
|
2
|
+
.effective-order-payment-details
|
3
|
+
%h3 Payment Details
|
4
|
+
%table.table
|
5
|
+
%tbody
|
6
|
+
%tr
|
7
|
+
%td Provider
|
8
|
+
%td= order.payment_provider
|
9
|
+
%tr
|
10
|
+
%td Card
|
11
|
+
%td
|
12
|
+
= payment_card_label(order.payment_card)
|
13
|
+
= (order.payment['f4l4'] rescue nil)
|
14
|
+
|
15
|
+
%tr
|
16
|
+
%td Purchased at
|
17
|
+
%td= order.purchased_at.strftime('%Y-%m-%d %H:%M')
|
18
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_orders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
@@ -337,6 +337,7 @@ files:
|
|
337
337
|
- app/views/effective/orders/_order_note.html.haml
|
338
338
|
- app/views/effective/orders/_order_note_fields.html.haml
|
339
339
|
- app/views/effective/orders/_order_note_to_buyer.html.haml
|
340
|
+
- app/views/effective/orders/_order_payment_details.html.haml
|
340
341
|
- app/views/effective/orders/_order_shipping.html.haml
|
341
342
|
- app/views/effective/orders/_order_terms_and_conditions_fields.html.haml
|
342
343
|
- app/views/effective/orders/_order_user_fields.html.haml
|