diff --git a/activemerchant.gemspec b/activemerchant.gemspec index 337468750b0..32a71b35fbb 100644 --- a/activemerchant.gemspec +++ b/activemerchant.gemspec @@ -12,7 +12,6 @@ Gem::Specification.new do |s| s.author = 'Tobias Luetke' s.email = 'tobi@leetsoft.com' s.homepage = 'http://activemerchant.org/' - s.rubyforge_project = 'activemerchant' s.required_ruby_version = '>= 2.3' diff --git a/lib/active_merchant/billing/gateways/authorize_net_cim.rb b/lib/active_merchant/billing/gateways/authorize_net_cim.rb index b5f920a3a58..503651fbe4a 100644 --- a/lib/active_merchant/billing/gateways/authorize_net_cim.rb +++ b/lib/active_merchant/billing/gateways/authorize_net_cim.rb @@ -755,6 +755,7 @@ def add_payment_profile(xml, payment_profile) add_credit_card(xml, payment_profile[:payment][:credit_card]) if payment_profile[:payment].has_key?(:credit_card) add_bank_account(xml, payment_profile[:payment][:bank_account]) if payment_profile[:payment].has_key?(:bank_account) add_drivers_license(xml, payment_profile[:payment][:drivers_license]) if payment_profile[:payment].has_key?(:drivers_license) + add_acceptjs(xml, payment_profile[:payment][:acceptjs]) if payment_profile[:payment].has_key?(:acceptjs) # This element is only required for Wells Fargo SecureSource eCheck.Net merchants # The customer's Social Security Number or Tax ID xml.tag!('taxId', payment_profile[:payment]) if payment_profile[:payment].has_key?(:tax_id) @@ -764,6 +765,16 @@ def add_payment_profile(xml, payment_profile) xml.tag!('customerPaymentProfileId', payment_profile[:customer_payment_profile_id]) if payment_profile[:customer_payment_profile_id] end + def add_acceptjs(xml, data_value) + return unless data_value + xml.tag!('opaqueData') do + # The credit card number used for payment of the subscription + xml.tag!('dataDescriptor', "COMMON.ACCEPT.INAPP.PAYMENT") + # The expiration date of the credit card used for the subscription + xml.tag!('dataValue', data_value[:data_value]) + end + end + def add_ship_to_list(xml, ship_to_list) xml.tag!('shipToList') do add_address(xml, ship_to_list)