From 7898d6c87336c3b7d0861128b4536bf7251e4ccc Mon Sep 17 00:00:00 2001 From: Vince Puzzella Date: Tue, 12 Mar 2024 14:25:03 +0000 Subject: [PATCH] Netword token support for Auth, Purchase, and Verify --- lib/spreedly/environment.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/spreedly/environment.rb b/lib/spreedly/environment.rb index 6a22726..5021b58 100644 --- a/lib/spreedly/environment.rb +++ b/lib/spreedly/environment.rb @@ -186,6 +186,8 @@ def auth_purchase_body(amount, payment_method_token, options) add_to_doc(doc, options, :retain_on_success) add_to_doc(doc, options, :stored_credential_initiator) add_to_doc(doc, options, :stored_credential_reason_type) + add_to_doc(doc, options, :provision_network_token) + add_to_doc(doc, options, :attempt_network_token) add_extra_options_for_basic_ops(doc, options) end end @@ -196,6 +198,8 @@ def verify_body(payment_method_token, options) add_to_doc(doc, options, :retain_on_success) add_to_doc(doc, options, :stored_credential_initiator) add_to_doc(doc, options, :stored_credential_reason_type) + add_to_doc(doc, options, :provision_network_token) + add_to_doc(doc, options, :attempt_network_token) add_extra_options_for_basic_ops(doc, options) end end @@ -275,7 +279,7 @@ def add_credentials_to_doc(doc, credentials) def add_credit_card_body(options) build_xml_request('payment_method') do |doc| - add_to_doc(doc, options, :data, :retained, :email) + add_to_doc(doc, options, :data, :retained, :email, :provision_network_token) doc.credit_card do add_to_doc(doc, options, :number, :verification_value, :month, :full_name, :first_name, :last_name, :year, :address1, :address2, :city, :state, :zip, :country, :phone_number,