lib/active_merchant/billing/gateways/cyber_source.rb in activemerchant-1.107.2 vs lib/active_merchant/billing/gateways/cyber_source.rb in activemerchant-1.107.3
- old
+ new
@@ -278,10 +278,11 @@
add_payment_network_token(xml) if network_tokenization?(creditcard_or_reference)
add_business_rules_data(xml, creditcard_or_reference, options)
add_stored_credential_options(xml, options)
add_issuer_additional_data(xml, options)
add_merchant_description(xml, options)
+ add_partner_solution_id(xml)
xml.target!
end
def build_tax_calculation_request(creditcard, options)
@@ -305,10 +306,11 @@
add_mdd_fields(xml, options)
add_capture_service(xml, request_id, request_token)
add_business_rules_data(xml, authorization, options)
add_issuer_additional_data(xml, options)
add_merchant_description(xml, options)
+ add_partner_solution_id(xml)
xml.target!
end
def build_purchase_request(money, payment_method_or_reference, options)
@@ -325,10 +327,11 @@
add_payment_network_token(xml) if network_tokenization?(payment_method_or_reference)
add_business_rules_data(xml, payment_method_or_reference, options) unless options[:pinless_debit_card]
end
add_issuer_additional_data(xml, options)
add_merchant_description(xml, options)
+ add_partner_solution_id(xml)
xml.target!
end
def build_void_request(identification, options)
@@ -344,20 +347,23 @@
add_purchase_data(xml, money, true, options.merge(currency: currency || default_currency))
add_mdd_fields(xml, options)
add_auth_reversal_service(xml, request_id, request_token)
end
add_issuer_additional_data(xml, options)
+ add_partner_solution_id(xml)
+
xml.target!
end
def build_refund_request(money, identification, options)
order_id, request_id, request_token = identification.split(';')
options[:order_id] = order_id
xml = Builder::XmlMarkup.new indent: 2
add_purchase_data(xml, money, true, options)
add_credit_service(xml, request_id, request_token)
+ add_partner_solution_id(xml)
xml.target!
end
def build_credit_request(money, creditcard_or_reference, options)
@@ -469,11 +475,10 @@
xml.tag! 'merchantID', @options[:login]
xml.tag! 'merchantReferenceCode', options[:order_id] || generate_unique_id
xml.tag! 'clientLibrary', 'Ruby Active Merchant'
xml.tag! 'clientLibraryVersion', VERSION
xml.tag! 'clientEnvironment', RUBY_PLATFORM
- xml.tag!('partnerSolutionID', application_id) if application_id
add_merchant_descriptor(xml, options)
end
def add_merchant_descriptor(xml, options)
@@ -817,9 +822,15 @@
xml.tag! 'subsequentAuth', 'true'
xml.tag! 'subsequentAuthTransactionID', options[:stored_credential][:network_transaction_id]
else
xml.tag! 'subsequentAuthTransactionID', options[:stored_credential][:network_transaction_id]
end
+ end
+
+ def add_partner_solution_id(xml)
+ return unless application_id
+
+ xml.tag!('partnerSolutionID', application_id)
end
# Where we actually build the full SOAP request using builder
def build_request(body, options)
xsd_version = test? ? TEST_XSD_VERSION : PRODUCTION_XSD_VERSION