lib/braintree/credit_card_gateway.rb in braintree-4.14.0 vs lib/braintree/credit_card_gateway.rb in braintree-4.15.0

- old
+ new

@@ -10,10 +10,14 @@ def create(attributes) if attributes.has_key?(:expiration_date) && (attributes.has_key?(:expiration_month) || attributes.has_key?(:expiration_year)) raise ArgumentError.new("create with both expiration_month and expiration_year or only expiration_date") end + # NEXT_MAJOR_VERSION remove this check + if attributes.has_key?(:venmo_sdk_payment_method_code) || attributes.has_key?(:venmo_sdk_session) + warn "[DEPRECATED] The Venmo SDK integration is Unsupported. Please update your integration to use Pay with Venmo instead." + end Util.verify_keys(CreditCardGateway._create_signature, attributes) _do_create("/payment_methods", :credit_card => attributes) end def create!(*args) @@ -59,10 +63,14 @@ rescue NotFoundError raise NotFoundError, "nonce #{nonce.inspect} locked, consumed, or not found" end def update(token, attributes) + # NEXT_MAJOR_VERSION remove this check + if attributes.has_key?(:venmo_sdk_payment_method_code) || attributes.has_key?(:venmo_sdk_session) + warn "[DEPRECATED] The Venmo SDK integration is Unsupported. Please update your integration to use Pay with Venmo instead." + end Util.verify_keys(CreditCardGateway._update_signature, attributes) _do_update(:put, "/payment_methods/credit_card/#{token}", :credit_card => attributes) end def update!(*args) @@ -77,24 +85,28 @@ _signature(:update) end def self._signature(type) # :nodoc: billing_address_params = AddressGateway._shared_signature + # NEXT_MAJOR_VERSION Remove venmo_sdk_session + # The old venmo SDK class has been deprecated options = [ :fail_on_duplicate_payment_method, :make_default, :skip_advanced_fraud_checking, - :venmo_sdk_session, + :venmo_sdk_session, # Deprecated :verification_account_type, :verification_amount, :verification_currency_iso_code, :verification_merchant_account_id, :verify_card ] + # NEXT_MAJOR_VERSION Remove venmo_sdk_payment_method_code + # The old venmo SDK class has been deprecated signature = [ :billing_address_id, :cardholder_name, :cvv, :expiration_date, :expiration_month, - :expiration_year, :number, :token, :venmo_sdk_payment_method_code, :device_data, - :payment_method_nonce, + :expiration_year, :number, :token, :venmo_sdk_payment_method_code, # Deprecated + :device_data, :payment_method_nonce, {:external_vault => [:network_transaction_id]}, {:options => options}, {:billing_address => billing_address_params} ]