caboose-cms 0.5.154 → 0.5.155
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 +8 -8
- data/app/models/caboose/pending_orders_pdf.rb +83 -58
- data/lib/caboose/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODgyOGM1NGVlNDY1ZmMxOGY3OGFkYjQ1MTU3ODQ5NjdmMmMyYjQyMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NWRhNjEwNDQ3YWUzZTEzYjgyYzkyYzM5Mzk5MjE5Njk2NzQwMmFiYQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzBmYTVjYjg0YzYwNjVmMjEwYWI2YmIwOTViZmI3MDU0NDZkNjQ4YjMwNzE1
|
10
|
+
ZWM5MDFkZmRmYjllNjAzNWY1ZDNiMTRhODcxMTE3Zjc3Yjg0ZjAwMzdlNDIw
|
11
|
+
ZWE1MDJmMzM5OTRjNDRiZTcwZThmMzk1ODg4ZTM2ZWY2Mzc1ODI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODA3ZmQ0MzI0YTA1OWRjMjYwZWFiZDQ3NTBhYmU3MDA3NmQ3NWQ0ZjczNGNk
|
14
|
+
NzEzMjYxNjM3ODE4NjczNjRjMTZhNzQyYmQ2ZDkwMjAxNjVjMGQwOGZmOGZl
|
15
|
+
OWVkZTgzMzU0YWUyMTMxMjE4NTJkMmUzZjZmMmU4ZDE2ZjljMDg=
|
@@ -38,6 +38,7 @@ module Caboose
|
|
38
38
|
def get_card_details(order)
|
39
39
|
sc = order.site.store_config
|
40
40
|
ot = order.order_transactions.where(:transaction_type => OrderTransaction::TYPE_AUTHORIZE, :success => true).first
|
41
|
+
return if ot.nil?
|
41
42
|
case sc.pp_name
|
42
43
|
when 'authorize.net'
|
43
44
|
t = AuthorizeNet::Reporting::Transaction.new(sc.pp_username, sc.pp_password)
|
@@ -50,7 +51,7 @@ module Caboose
|
|
50
51
|
|
51
52
|
def order_info(order)
|
52
53
|
order_info = "Order Number: #{order.id}\n"
|
53
|
-
order_info << "Order Date: #{order.date_created.strftime('%d %b %Y %H:%M:%S %p')}\n"
|
54
|
+
order_info << "Order Date: #{order.date_created ? order.date_created.strftime('%d %b %Y %H:%M:%S %p') : ''}\n"
|
54
55
|
order_info << "Status: #{order.status.capitalize}\n"
|
55
56
|
tbl = []
|
56
57
|
tbl << [
|
@@ -65,41 +66,55 @@ module Caboose
|
|
65
66
|
c = order.customer
|
66
67
|
ba = order.billing_address
|
67
68
|
billed_to = []
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
69
|
+
if ba
|
70
|
+
billed_to << [
|
71
|
+
{ :content => "Name", :border_width => 0 },
|
72
|
+
{ :content => "#{ba.first_name} #{ba.last_name}", :border_width => 0}
|
73
|
+
]
|
74
|
+
billed_to << [
|
75
|
+
{ :content => "Address", :border_width => 0 },
|
76
|
+
{ :content => "#{ba.address1}" + (ba.address2.blank? ? '' : "\n#{ba.address2}") + "\n#{ba.city}, #{ba.state} #{ba.zip}", :border_width => 0}
|
77
|
+
]
|
78
|
+
billed_to << [
|
79
|
+
{ :content => "Email", :border_width => 0 },
|
80
|
+
{ :content => "#{c.email}", :border_width => 0}
|
81
|
+
]
|
82
|
+
billed_to << [
|
83
|
+
{ :content => "Phone", :border_width => 0 },
|
84
|
+
{ :content => "#{self.formatted_phone(c.phone)}", :border_width => 0}
|
85
|
+
]
|
86
|
+
else
|
87
|
+
billed_to << [{ :content => "Name" , :border_width => 0 }]
|
88
|
+
billed_to << [{ :content => "Address" , :border_width => 0 }]
|
89
|
+
billed_to << [{ :content => "Email" , :border_width => 0 }]
|
90
|
+
billed_to << [{ :content => "Phone" , :border_width => 0 }]
|
91
|
+
end
|
92
|
+
|
85
93
|
sa = order.shipping_address
|
86
94
|
shipped_to = []
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
95
|
+
if sa
|
96
|
+
shipped_to << [
|
97
|
+
{ :content => "Name", :border_width => 0 },
|
98
|
+
{ :content => "#{sa.first_name} #{sa.last_name}", :border_width => 0}
|
99
|
+
]
|
100
|
+
shipped_to << [
|
101
|
+
{ :content => "Address", :border_width => 0 },
|
102
|
+
{ :content => "#{sa.address1}" + (sa.address2.blank? ? '' : "\n#{sa.address2}") + "\n#{sa.city}, #{sa.state} #{sa.zip}", :border_width => 0}
|
103
|
+
]
|
104
|
+
shipped_to << [
|
105
|
+
{ :content => "Email", :border_width => 0 },
|
106
|
+
{ :content => "#{c.email}", :border_width => 0}
|
107
|
+
]
|
108
|
+
shipped_to << [
|
109
|
+
{ :content => "Phone", :border_width => 0 },
|
110
|
+
{ :content => "#{self.formatted_phone(c.phone)}", :border_width => 0}
|
111
|
+
]
|
112
|
+
else
|
113
|
+
shipped_to << [{ :content => "Name" , :border_width => 0 }]
|
114
|
+
shipped_to << [{ :content => "Address" , :border_width => 0 }]
|
115
|
+
shipped_to << [{ :content => "Email" , :border_width => 0 }]
|
116
|
+
shipped_to << [{ :content => "Phone" , :border_width => 0 }]
|
117
|
+
end
|
103
118
|
|
104
119
|
tbl = []
|
105
120
|
tbl << [
|
@@ -202,30 +217,40 @@ module Caboose
|
|
202
217
|
tbl2 = []
|
203
218
|
tbl3 = []
|
204
219
|
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
220
|
+
if trans
|
221
|
+
tbl2 << [
|
222
|
+
{ :content => "Card Type", :width => 127, :border_width => 0 },
|
223
|
+
{ :content => self.card_type, :width => 128, :border_width => 0 }
|
224
|
+
]
|
225
|
+
tbl2 << [
|
226
|
+
{ :content => "Transaction ID", :width => 127, :border_width => 0 },
|
227
|
+
{ :content => trans.transaction_id.to_s, :width => 128, :border_width => 0 }
|
228
|
+
]
|
229
|
+
tbl2 << [
|
230
|
+
{ :content => "Gateway Response", :width => 127, :border_width => 0},
|
231
|
+
{ :content => trans.response_code.to_s, :width => 128, :border_width => 0 }
|
232
|
+
]
|
233
|
+
tbl3 << [
|
234
|
+
{ :content => "Card Number", :width => 127, :border_width => 0},
|
235
|
+
{ :content => "XXXX XXXX XXXX " + self.card_number, :width => 128, :border_width => 0 }
|
236
|
+
]
|
237
|
+
tbl3 << [
|
238
|
+
{ :content => "Transaction Time", :width => 127, :border_width => 0},
|
239
|
+
{ :content => trans.date_processed.strftime("%d %b %Y %H:%M:%S %p"), :width => 128, :border_width => 0 }
|
240
|
+
]
|
241
|
+
tbl3 << [
|
242
|
+
{ :content => "Payment Process", :width => 127, :border_width => 0},
|
243
|
+
{ :content => trans.success ? "Successful" : "Failed", :width => 128, :border_width => 0 }
|
244
|
+
]
|
245
|
+
else
|
246
|
+
tbl2 << [{ :content => "Card Type" , :width => 127, :border_width => 0}]
|
247
|
+
tbl2 << [{ :content => "Transaction ID" , :width => 127, :border_width => 0}]
|
248
|
+
tbl2 << [{ :content => "Gateway Response" , :width => 127, :border_width => 0}]
|
249
|
+
tbl3 << [{ :content => "Card Number" , :width => 127, :border_width => 0}]
|
250
|
+
tbl3 << [{ :content => "Transaction Time" , :width => 127, :border_width => 0}]
|
251
|
+
tbl3 << [{ :content => "Payment Process" , :width => 127, :border_width => 0}]
|
252
|
+
end
|
253
|
+
|
229
254
|
tbl << [
|
230
255
|
{ :content => "Authorization Details", :colspan => 2, :font_style => :bold }
|
231
256
|
]
|
data/lib/caboose/version.rb
CHANGED