lib/active_merchant/billing/gateways/cyber_source.rb in activemerchant-1.131.0 vs lib/active_merchant/billing/gateways/cyber_source.rb in activemerchant-1.133.0
- old
+ new
@@ -130,10 +130,15 @@
r701: 'Export bill_country/ship_country match',
r702: 'Export email_country match',
r703: 'Export hostname_country/ip_country match'
}
+ @@payment_solution = {
+ apple_pay: '001',
+ google_pay: '012'
+ }
+
# These are the options that can be used when creating a new CyberSource
# Gateway object.
#
# :login => your username
#
@@ -320,10 +325,11 @@
add_threeds_services(xml, options)
add_business_rules_data(xml, creditcard_or_reference, options)
add_airline_data(xml, options)
add_sales_slip_number(xml, options)
add_payment_network_token(xml) if network_tokenization?(creditcard_or_reference)
+ add_payment_solution(xml, creditcard_or_reference.source) if network_tokenization?(creditcard_or_reference)
add_tax_management_indicator(xml, options)
add_stored_credential_subsequent_auth(xml, options)
add_issuer_additional_data(xml, options)
add_partner_solution_id(xml)
add_stored_credential_options(xml, options)
@@ -391,10 +397,11 @@
add_threeds_services(xml, options)
add_business_rules_data(xml, payment_method_or_reference, options)
add_airline_data(xml, options)
add_sales_slip_number(xml, options)
add_payment_network_token(xml) if network_tokenization?(payment_method_or_reference)
+ add_payment_solution(xml, payment_method_or_reference.source) if network_tokenization?(payment_method_or_reference)
add_tax_management_indicator(xml, options)
add_stored_credential_subsequent_auth(xml, options)
add_issuer_additional_data(xml, options)
add_partner_solution_id(xml)
add_stored_credential_options(xml, options)
@@ -666,9 +673,15 @@
xml.tag! 'decisionManager' do
xml.tag! 'enabled', options[:decision_manager_enabled] if options[:decision_manager_enabled]
xml.tag! 'profile', options[:decision_manager_profile] if options[:decision_manager_profile]
end
+ end
+
+ def add_payment_solution(xml, source)
+ return unless (payment_solution = @@payment_solution[source])
+
+ xml.tag! 'paymentSolution', payment_solution
end
def add_issuer_additional_data(xml, options)
return unless options[:issuer_additional_data]