activemerchant 1.42.3 → 1.42.4
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG +7 -0
- data/lib/active_merchant/billing/gateways/cyber_source.rb +11 -3
- data/lib/active_merchant/billing/gateways/data_cash.rb +2 -0
- data/lib/active_merchant/billing/gateways/stripe.rb +19 -9
- data/lib/active_merchant/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
    
        checksums.yaml
    CHANGED
    
    | @@ -1,15 +1,15 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            !binary "U0hBMQ==":
         | 
| 3 3 | 
             
              metadata.gz: !binary |-
         | 
| 4 | 
            -
                 | 
| 4 | 
            +
                NThjMjQ4YWE3M2Y3MGUyM2UzMDg2MWQ3ZjJjYjNiMzAyNzUxNTUyYw==
         | 
| 5 5 | 
             
              data.tar.gz: !binary |-
         | 
| 6 | 
            -
                 | 
| 6 | 
            +
                ZTVkZDAwNWUyOGIwZGJmYzQxMmRmOWQ0YTdjODQ1Y2RkZTYxOGU3NA==
         | 
| 7 7 | 
             
            SHA512:
         | 
| 8 8 | 
             
              metadata.gz: !binary |-
         | 
| 9 | 
            -
                 | 
| 10 | 
            -
                 | 
| 11 | 
            -
                 | 
| 9 | 
            +
                MjBkOGY2OTgzZTg3YzU5YmEwMzQwZjI3ODM2MTcwZDdmODBlYTExMjRiNTVi
         | 
| 10 | 
            +
                YzYyMDdlNThkYjBhNTBhMWFjZWM0ZTdkODVlYTI1NGVjNTdjMWU3ZTg1YmYx
         | 
| 11 | 
            +
                NTVjYjE5ZTA1ZDYyNDgzYTE2NDY1MDY2NDMyOGQ4ZDRmM2E5OWI=
         | 
| 12 12 | 
             
              data.tar.gz: !binary |-
         | 
| 13 | 
            -
                 | 
| 14 | 
            -
                 | 
| 15 | 
            -
                 | 
| 13 | 
            +
                MmMwZDg4OGJmNzFlOTI4N2ZlNjczYWRkY2ZjM2ZiOGIzZTBmNGQ1M2VkZGRj
         | 
| 14 | 
            +
                MWZjOGU0YjEyMDRhMmZmYzBiMDBhMmFmMGNiM2JkMjQ1MDUxMGE4NTc5NDVm
         | 
| 15 | 
            +
                NWYyZGI1NWYzZmMzYzgyNTBjZDkyMDc2NTVhMzJmYWE2ZWYxZTY=
         | 
    
        checksums.yaml.gz.sig
    CHANGED
    
    | Binary file | 
    
        data.tar.gz.sig
    CHANGED
    
    | Binary file | 
    
        data/CHANGELOG
    CHANGED
    
    | @@ -1,5 +1,12 @@ | |
| 1 1 | 
             
            = ActiveMerchant CHANGELOG
         | 
| 2 2 |  | 
| 3 | 
            +
            == Version 1.42.4 (January 8th, 2014)
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            * DataCash: Set 'ecomm' as capturemethod [DavidGeukers]
         | 
| 6 | 
            +
            * Cybersource: Fix subscriptions with a setup fee [ntalbott]
         | 
| 7 | 
            +
            * Stripe: Do not pass customer details to the /cards endpoint [michellebu]
         | 
| 8 | 
            +
            * Stripe: Allow Stripe API version to be initialized with the gateway [odorcicd]
         | 
| 9 | 
            +
             | 
| 3 10 | 
             
            == Version 1.42.3 (December 18th, 2013)
         | 
| 4 11 |  | 
| 5 12 | 
             
            * Balanced: Add support for appears_on_statement_as [duff]
         | 
| @@ -313,7 +313,10 @@ module ActiveMerchant #:nodoc: | |
| 313 313 | 
             
                  end
         | 
| 314 314 |  | 
| 315 315 | 
             
                  def build_create_subscription_request(payment_method, options)
         | 
| 316 | 
            -
                     | 
| 316 | 
            +
                    default_subscription_params = {:frequency => "on-demand", :amount => 0, :automatic_renew => false}
         | 
| 317 | 
            +
                    options[:subscription] = default_subscription_params.update(
         | 
| 318 | 
            +
                      options[:subscription] || {}
         | 
| 319 | 
            +
                    )
         | 
| 317 320 |  | 
| 318 321 | 
             
                    xml = Builder::XmlMarkup.new :indent => 2
         | 
| 319 322 | 
             
                    add_address(xml, payment_method, options[:billing_address], options)
         | 
| @@ -321,13 +324,18 @@ module ActiveMerchant #:nodoc: | |
| 321 324 | 
             
                    if card_brand(payment_method) == 'check'
         | 
| 322 325 | 
             
                      add_check(xml, payment_method)
         | 
| 323 326 | 
             
                      add_check_payment_method(xml)
         | 
| 324 | 
            -
                      add_check_service(xml, options) if options[:setup_fee]
         | 
| 325 327 | 
             
                    else
         | 
| 326 328 | 
             
                      add_creditcard(xml, payment_method)
         | 
| 327 329 | 
             
                      add_creditcard_payment_method(xml)
         | 
| 328 | 
            -
                      add_purchase_service(xml, options) if options[:setup_fee]
         | 
| 329 330 | 
             
                    end
         | 
| 330 331 | 
             
                    add_subscription(xml, options)
         | 
| 332 | 
            +
                    if options[:setup_fee]
         | 
| 333 | 
            +
                      if card_brand(payment_method) == 'check'
         | 
| 334 | 
            +
                        add_check_service(xml, options)
         | 
| 335 | 
            +
                      else
         | 
| 336 | 
            +
                        add_purchase_service(xml, options)
         | 
| 337 | 
            +
                      end
         | 
| 338 | 
            +
                    end
         | 
| 331 339 | 
             
                    add_subscription_create_service(xml, options)
         | 
| 332 340 | 
             
                    add_business_rules_data(xml)
         | 
| 333 341 | 
             
                    xml.target!
         | 
| @@ -200,6 +200,7 @@ module ActiveMerchant | |
| 200 200 | 
             
                          xml.tag! :TxnDetails do
         | 
| 201 201 | 
             
                            xml.tag! :merchantreference, format_reference_number(options[:order_id])
         | 
| 202 202 | 
             
                            xml.tag! :amount, amount(money), :currency => options[:currency] || currency(money)
         | 
| 203 | 
            +
                            xml.tag! :capturemethod, 'ecomm'
         | 
| 203 204 | 
             
                          end
         | 
| 204 205 | 
             
                        end
         | 
| 205 206 | 
             
                      end
         | 
| @@ -285,6 +286,7 @@ module ActiveMerchant | |
| 285 286 | 
             
                        xml.tag! :TxnDetails do
         | 
| 286 287 | 
             
                          xml.tag! :merchantreference, format_reference_number(options[:order_id])
         | 
| 287 288 | 
             
                          xml.tag! :amount, amount(money), :currency => options[:currency] || currency(money)
         | 
| 289 | 
            +
                          xml.tag! :capturemethod, 'ecomm'
         | 
| 288 290 | 
             
                        end
         | 
| 289 291 | 
             
                      end
         | 
| 290 292 | 
             
                    end
         | 
| @@ -33,6 +33,8 @@ module ActiveMerchant #:nodoc: | |
| 33 33 | 
             
                    requires!(options, :login)
         | 
| 34 34 | 
             
                    @api_key = options[:login]
         | 
| 35 35 | 
             
                    @fee_refund_api_key = options[:fee_refund_login]
         | 
| 36 | 
            +
                    @version = options[:version]
         | 
| 37 | 
            +
             | 
| 36 38 | 
             
                    super
         | 
| 37 39 | 
             
                  end
         | 
| 38 40 |  | 
| @@ -69,6 +71,7 @@ module ActiveMerchant #:nodoc: | |
| 69 71 |  | 
| 70 72 | 
             
                  def refund(money, identification, options = {})
         | 
| 71 73 | 
             
                    post = {:amount => amount(money)}
         | 
| 74 | 
            +
                    post[:refund_application_fee] = true if options[:refund_application_fee]
         | 
| 72 75 |  | 
| 73 76 | 
             
                    MultiResponse.run(:first) do |r|
         | 
| 74 77 | 
             
                      r.process { commit(:post, "charges/#{CGI.escape(identification)}/refund", post, options) }
         | 
| @@ -99,20 +102,26 @@ module ActiveMerchant #:nodoc: | |
| 99 102 | 
             
                  # Note: creating a new credit card will not change the customer's existing default credit card (use :set_default => true)
         | 
| 100 103 | 
             
                  def store(creditcard, options = {})
         | 
| 101 104 | 
             
                    post = {}
         | 
| 102 | 
            -
                     | 
| 103 | 
            -
                     | 
| 104 | 
            -
                    post[: | 
| 105 | 
            +
                    card_params = {}
         | 
| 106 | 
            +
                    add_creditcard(card_params, creditcard, options)
         | 
| 107 | 
            +
                    post[:description] = options[:description] if options[:description]
         | 
| 108 | 
            +
                    post[:email] = options[:email] if options[:email]
         | 
| 105 109 |  | 
| 106 110 | 
             
                    if options[:customer]
         | 
| 107 111 | 
             
                      MultiResponse.run(:first) do |r|
         | 
| 108 | 
            -
                         | 
| 112 | 
            +
                        # The /cards endpoint does not update other customer parameters.
         | 
| 113 | 
            +
                        r.process { commit(:post, "customers/#{CGI.escape(options[:customer])}/cards", card_params, options) }
         | 
| 109 114 |  | 
| 110 | 
            -
                         | 
| 115 | 
            +
                        if options[:set_default] and r.success? and !r.params['id'].blank?
         | 
| 116 | 
            +
                          post[:default_card] = r.params['id']
         | 
| 117 | 
            +
                        end
         | 
| 111 118 |  | 
| 112 | 
            -
                         | 
| 119 | 
            +
                        if post.count > 0
         | 
| 120 | 
            +
                          r.process { update_customer(options[:customer], post) }
         | 
| 121 | 
            +
                        end
         | 
| 113 122 | 
             
                      end
         | 
| 114 123 | 
             
                    else
         | 
| 115 | 
            -
                      commit(:post, 'customers', post, options)
         | 
| 124 | 
            +
                      commit(:post, 'customers', post.merge(card_params), options)
         | 
| 116 125 | 
             
                    end
         | 
| 117 126 | 
             
                  end
         | 
| 118 127 |  | 
| @@ -252,7 +261,8 @@ module ActiveMerchant #:nodoc: | |
| 252 261 | 
             
                      :publisher => 'active_merchant'
         | 
| 253 262 | 
             
                    })
         | 
| 254 263 |  | 
| 255 | 
            -
                    key | 
| 264 | 
            +
                    key     = options[:key] || @api_key
         | 
| 265 | 
            +
                    version = options[:version] || @version
         | 
| 256 266 |  | 
| 257 267 | 
             
                    headers = {
         | 
| 258 268 | 
             
                      "Authorization" => "Basic " + Base64.encode64(key.to_s + ":").strip,
         | 
| @@ -260,7 +270,7 @@ module ActiveMerchant #:nodoc: | |
| 260 270 | 
             
                      "X-Stripe-Client-User-Agent" => @@ua,
         | 
| 261 271 | 
             
                      "X-Stripe-Client-User-Metadata" => {:ip => options[:ip]}.to_json
         | 
| 262 272 | 
             
                    }
         | 
| 263 | 
            -
                    headers.merge!("Stripe-Version" =>  | 
| 273 | 
            +
                    headers.merge!("Stripe-Version" => version) if version
         | 
| 264 274 | 
             
                    headers
         | 
| 265 275 | 
             
                  end
         | 
| 266 276 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: activemerchant
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.42. | 
| 4 | 
            +
              version: 1.42.4
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Tobias Luetke
         | 
| @@ -38,7 +38,7 @@ cert_chain: | |
| 38 38 | 
             
              U1BPVm5oYkZKM3ZTWFkxdWxQL1I2WFc5dm53CjZra1FpMmZIaFUyMHVnTXpw
         | 
| 39 39 | 
             
              ODgxRWl4citUakMwUnZVZXJMRzdnPT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUt
         | 
| 40 40 | 
             
              LS0tLQo=
         | 
| 41 | 
            -
            date:  | 
| 41 | 
            +
            date: 2014-01-08 00:00:00.000000000 Z
         | 
| 42 42 | 
             
            dependencies:
         | 
| 43 43 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 44 44 | 
             
              name: activesupport
         | 
    
        metadata.gz.sig
    CHANGED
    
    | Binary file |