lib/braintree/transaction_gateway.rb in braintree-2.25.0 vs lib/braintree/transaction_gateway.rb in braintree-2.26.0

- old
+ new

@@ -81,11 +81,16 @@ def search(&block) search = TransactionSearch.new block.call(search) if block response = @config.http.post "/transactions/advanced_search_ids", {:search => search.to_hash} - ResourceCollection.new(response) { |ids| _fetch_transactions(search, ids) } + + if response.has_key?(:search_results) + ResourceCollection.new(response) { |ids| _fetch_transactions(search, ids) } + else + raise DownForMaintenanceError + end end def release_from_escrow(transaction_id) raise ArgumentError, "transaction_id is invalid" unless transaction_id =~ /\A[0-9a-z]+\z/ response = @config.http.put "/transactions/#{transaction_id}/release_from_escrow" @@ -109,10 +114,10 @@ def self._create_signature # :nodoc: [ :amount, :customer_id, :merchant_account_id, :order_id, :channel, :payment_method_token, :purchase_order_number, :recurring, :shipping_address_id, :type, :tax_amount, :tax_exempt, - :venmo_sdk_payment_method_code, :device_session_id, :service_fee_amount, :device_data, + :venmo_sdk_payment_method_code, :device_session_id, :service_fee_amount, :device_data, :fraud_merchant_id, {:credit_card => [:token, :cardholder_name, :cvv, :expiration_date, :expiration_month, :expiration_year, :number]}, {:customer => [:id, :company, :email, :fax, :first_name, :last_name, :phone, :website]}, { :billing => AddressGateway._shared_signature },