pay 1.0.0.rc2 → 1.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of pay might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/pay/receipts.rb +10 -6
- data/lib/pay/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66c49f668b673801a021ca055ec7523e53ba3e4e911e8eed3c3524a25848180e
|
4
|
+
data.tar.gz: ce0316fe7dca26c2d9b200c53ff4ce5566bcde1d14d9a5f0345e238823a00d20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abb0ddf46681b276bbf7e02d94df4bebc91070c16b361a4b295ac4ba0b6ac5ecaf1af36f4772cfcff11f5bc830c0c2fd7fb5ad8434d712e8d90b0c077ada9901
|
7
|
+
data.tar.gz: eb768f976782888c8cdf7895c8f17b74ff227c456c26c8cb420e5fbff6195d46cafbd563ccc9548ea3f30d1a9439e6965d06d9cf29fb1c0dfdae1cab7a621595
|
data/lib/pay/receipts.rb
CHANGED
@@ -4,19 +4,23 @@ module Pay
|
|
4
4
|
"receipt-#{created_at.strftime('%Y-%m-%d')}.pdf"
|
5
5
|
end
|
6
6
|
|
7
|
+
def product
|
8
|
+
Pay.application_name
|
9
|
+
end
|
10
|
+
|
7
11
|
# Must return a file object
|
8
12
|
def receipt
|
9
13
|
receipt_pdf.render
|
10
14
|
end
|
11
15
|
|
12
16
|
def receipt_pdf
|
13
|
-
Receipts::Receipt.new(
|
17
|
+
::Receipts::Receipt.new(
|
14
18
|
id: id,
|
15
|
-
product:
|
19
|
+
product: product,
|
16
20
|
company: {
|
17
|
-
name: Pay.
|
18
|
-
address: Pay.
|
19
|
-
email: Pay.
|
21
|
+
name: Pay.business_name,
|
22
|
+
address: Pay.business_address,
|
23
|
+
email: Pay.support_email,
|
20
24
|
},
|
21
25
|
line_items: line_items
|
22
26
|
)
|
@@ -26,7 +30,7 @@ module Pay
|
|
26
30
|
line_items = [
|
27
31
|
["Date", created_at.to_s],
|
28
32
|
["Account Billed", "#{owner.name} (#{owner.email})"],
|
29
|
-
["Product",
|
33
|
+
["Product", product],
|
30
34
|
["Amount", ActionController::Base.helpers.number_to_currency(amount / 100.0)],
|
31
35
|
["Charged to", charged_to],
|
32
36
|
]
|
data/lib/pay/version.rb
CHANGED