lib/active_merchant/billing/gateways/securion_pay.rb in activemerchant-1.85.0 vs lib/active_merchant/billing/gateways/securion_pay.rb in activemerchant-1.86.0

- old
+ new

@@ -71,15 +71,15 @@ end def store(credit_card, options = {}) if options[:customer_id].blank? MultiResponse.run() do |r| - #create charge object + # create charge object r.process { authorize(100, credit_card, options) } - #create customer and save card + # create customer and save card r.process { create_customer_add_card(r.authorization, options) } - #void the charge + # void the charge r.process(:ignore_result) { void(r.params['metadata']['chargeId'], options) } end else verify(credit_card, options) end @@ -163,11 +163,11 @@ raise ArgumentError.new("Unhandled payment method #{creditcard.class}.") end end def add_address(post, options) - return unless post[:card] && post[:card].kind_of?(Hash) + return unless post[:card]&.kind_of?(Hash) if address = options[:billing_address] post[:card][:addressLine1] = address[:address1] if address[:address1] post[:card][:addressLine2] = address[:address2] if address[:address2] post[:card][:addressCountry] = address[:country] if address[:country] post[:card][:addressZip] = address[:zip] if address[:zip] @@ -255,10 +255,10 @@ } } end def test? - (@options[:secret_key] && @options[:secret_key].include?('_test_')) + (@options[:secret_key]&.include?('_test_')) end end end end