caboose-cms 0.9.14 → 0.9.15

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: 9681e9d45d9fff14990160d8624743cd13ed8a9e
4
- data.tar.gz: d23a96815a804fce45912689d019e54dfcdc2ece
3
+ metadata.gz: 01eb9c720f24704a6cca2f10bf9d7a2aa704c674
4
+ data.tar.gz: 0463ebc0ca770d22cb8fab8e0ff1e66a8b2c60f3
5
5
  SHA512:
6
- metadata.gz: 15807d4c1de568fd7f8f8da8f8a23d1af853a3b236d44b1ea49951d1fdc662675ecb4e7ef322f62d48ac8e71183c1360933ce0a9217eeca7be6ea6b0e7a75cae
7
- data.tar.gz: 943d42b43ca36c4bbb429e52b22260fe86bc58c586e1c28503ef5c4f78c404388cab44321ee96a7b7c315fc8a3cf4ec95668086365ccf49844c02f3fd376efad
6
+ metadata.gz: 3b0d1deb8db6ca1a044267d86dad52287d8f55e29be98525b0e7f84b9201b7ca0acdd7e737c9299b2c11da2f9b24d6bc31596c7377f74b3928077f39b73f0551
7
+ data.tar.gz: 7a590c8fc086caf5c42970b390a870a907f11fae502fd3f0139bda5cfcf0c0ac88037660ab441a2ee31cad03b12d6d93aba2bbbf79686fe9cdf00723825c779c
@@ -54,26 +54,29 @@ module Caboose
54
54
  sc = self.invoice.site.store_config
55
55
  ot = self.invoice.invoice_transactions.where(:transaction_type => InvoiceTransaction::TYPE_AUTHORIZE, :success => true).first
56
56
 
57
- case ot.payment_processor
58
- when StoreConfig::PAYMENT_PROCESSOR_AUTHNET
59
-
60
- if ot
61
- t = AuthorizeNet::Reporting::Transaction.new(sc.authnet_api_login_id, sc.authnet_api_transaction_key)
62
- resp = t.get_transaction_details(ot.transaction_id)
63
- t2 = resp.transaction
64
- if t2
65
- self.card_type = t2.payment_method.card_type.upcase
66
- self.card_number = t2.payment_method.card_number.gsub('X', '')
57
+ if ot
58
+
59
+ case ot.payment_processor
60
+ when StoreConfig::PAYMENT_PROCESSOR_AUTHNET
61
+
62
+ if ot
63
+ t = AuthorizeNet::Reporting::Transaction.new(sc.authnet_api_login_id, sc.authnet_api_transaction_key)
64
+ resp = t.get_transaction_details(ot.transaction_id)
65
+ t2 = resp.transaction
66
+ if t2
67
+ self.card_type = t2.payment_method.card_type.upcase
68
+ self.card_number = t2.payment_method.card_number.gsub('X', '')
69
+ end
70
+ else
71
+ self.card_type = ""
72
+ self.card_number = ""
67
73
  end
68
- else
69
- self.card_type = ""
70
- self.card_number = ""
71
- end
72
-
73
- when StoreConfig::PAYMENT_PROCESSOR_STRIPE
74
74
 
75
- self.card_type = self.invoice.customer.card_brand
76
- self.card_number = self.invoice.customer.card_last4
75
+ when StoreConfig::PAYMENT_PROCESSOR_STRIPE
76
+
77
+ self.card_type = self.invoice.customer.card_brand
78
+ self.card_number = self.invoice.customer.card_last4
79
+ end
77
80
 
78
81
  end
79
82
 
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.14'
2
+ VERSION = '0.9.15'
3
3
  end
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.9.14
4
+ version: 0.9.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry