lib/active_merchant/billing/gateways/smart_ps.rb in activemerchant-1.83.0 vs lib/active_merchant/billing/gateways/smart_ps.rb in activemerchant-1.84.0

- old
+ new

@@ -104,11 +104,10 @@ add_invoice(post, options) add_transaction(post, auth) commit('update', nil, post) end - def delete(vault_id) post = {} post[:customer_vault] = 'delete_customer' add_customer_vault_id(post, vault_id) commit(nil, nil, post) @@ -126,10 +125,11 @@ end alias_method :unstore, :delete private + def add_customer_data(post, options) if options.has_key? :email post[:email] = options[:email] end @@ -235,21 +235,19 @@ :authorization => (response['transactionid'] || response['customer_vault_id']), :test => test?, :cvv_result => response['cvvresponse'], :avs_result => { :code => response['avsresponse'] } ) - end def expdate(creditcard) year = sprintf('%.04i', creditcard.year) month = sprintf('%.02i', creditcard.month) "#{month}#{year[-2..-1]}" end - def message_from(response) case response['responsetext'] when 'SUCCESS', 'Approved', nil # This is dubious, but responses from UPDATE are nil. 'This transaction has been approved' when 'DECLINE' @@ -270,10 +268,10 @@ end def determine_funding_source(source) case when source.is_a?(String) then :vault - when CreditCard.card_companies.keys.include?(card_brand(source)) then :credit_card + when CreditCard.card_companies.include?(card_brand(source)) then :credit_card when card_brand(source) == 'check' then :check else raise ArgumentError, 'Unsupported funding source provided' end end end