lib/braintree/transaction_gateway.rb in braintree-2.12.0 vs lib/braintree/transaction_gateway.rb in braintree-2.13.0
- old
+ new
@@ -29,9 +29,10 @@
def credit(attributes)
create(attributes.merge(:type => 'credit'))
end
def find(id)
+ raise ArgumentError if id.nil? || id.strip.to_s == ""
response = @config.http.get "/transactions/#{id}"
Transaction._new(@gateway, response[:transaction])
rescue NotFoundError
raise NotFoundError, "transaction with id #{id.inspect} not found"
end