caboose-cms 0.8.4 → 0.8.5
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 +4 -4
- data/app/models/caboose/#Untitled-1# +8 -0
- data/app/models/caboose/invoice.rb +1 -1
- data/app/models/caboose/pending_invoices_pdf.rb +13 -3
- data/lib/caboose/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: 59fc033c05abe2f23954ce803dd00f809c36678c
|
4
|
+
data.tar.gz: 2a7035a96fc350ed1701b4041a812235410e3c56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eea7bb02374ab7f63fb3fccd4f6148242f8dcc1a0aa833282f0787a98c5d88864746c86db5628ede45078bd310d66bcc42e756bafb065af0501447949929789
|
7
|
+
data.tar.gz: fc4fcce43193ccaff153dc0dfd4c37e20bb8c957b4896e5e156234aee0404e6019c7c65503fcba209a2cd7555de2521bd515679e623b65ea08031056e58c357b
|
@@ -37,12 +37,19 @@ module Caboose
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def get_card_details(invoice)
|
40
|
-
return if self.print_card_details && self.print_card_details == false
|
40
|
+
return if self.print_card_details && self.print_card_details == false
|
41
|
+
|
42
|
+
if invoice.customer.card_brand
|
43
|
+
self.card_type = invoice.customer.card_brand
|
44
|
+
self.card_number = invoice.customer.card_last4
|
45
|
+
return
|
46
|
+
end
|
47
|
+
|
41
48
|
sc = invoice.site.store_config
|
42
49
|
ot = invoice.invoice_transactions.where(:transaction_type => InvoiceTransaction::TYPE_AUTHORIZE, :success => true).first
|
43
50
|
return if ot.nil?
|
44
|
-
case
|
45
|
-
when
|
51
|
+
case ot.payment_processor
|
52
|
+
when StoreConfig::PAYMENT_PROCESSOR_AUTHNET
|
46
53
|
t = AuthorizeNet::Reporting::Transaction.new(sc.authnet_api_login_id, sc.authnet_api_transaction_key)
|
47
54
|
resp = t.get_transaction_details(ot.transaction_id)
|
48
55
|
t2 = resp.transaction
|
@@ -50,6 +57,9 @@ module Caboose
|
|
50
57
|
self.card_type = t2.payment_method.card_type.upcase
|
51
58
|
self.card_number = t2.payment_method.card_number.gsub('X', '')
|
52
59
|
end
|
60
|
+
when StoreConfig::PAYMENT_PROCESSOR_STRIPE
|
61
|
+
self.card_type = invoice.customer.card_brand
|
62
|
+
self.card_number = invoice.customer.card_last4
|
53
63
|
end
|
54
64
|
end
|
55
65
|
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
@@ -805,6 +805,7 @@ files:
|
|
805
805
|
- app/mailers/caboose/caboose_mailer.rb
|
806
806
|
- app/mailers/caboose/invoices_mailer.rb
|
807
807
|
- app/mailers/caboose/login_mailer.rb
|
808
|
+
- app/models/caboose/#Untitled-1#
|
808
809
|
- app/models/caboose/ab_option.rb
|
809
810
|
- app/models/caboose/ab_testing.rb
|
810
811
|
- app/models/caboose/ab_value.rb
|