caboose-cms 0.9.14 → 0.9.15
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/invoice_pdf.rb +21 -18
- data/lib/caboose/version.rb +1 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 01eb9c720f24704a6cca2f10bf9d7a2aa704c674
         | 
| 4 | 
            +
              data.tar.gz: 0463ebc0ca770d22cb8fab8e0ff1e66a8b2c60f3
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 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 | 
            -
                   | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
                       | 
| 61 | 
            -
                         | 
| 62 | 
            -
                         | 
| 63 | 
            -
             | 
| 64 | 
            -
             | 
| 65 | 
            -
                           | 
| 66 | 
            -
                           | 
| 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 | 
            -
                       | 
| 76 | 
            -
             | 
| 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 |  | 
    
        data/lib/caboose/version.rb
    CHANGED