Skip to content

Commit 2c1cb76

Browse files
committed
Convert all response values to a string
Although RestClient::Response acts like a string, it raises a warning if #to_i is called on it, such as by our own Util.to_numeric (since RestClient::Response used to have behavior of returning an HTTP status code). We now start with response values as strings for less confusing processing by clients.
1 parent 9593e82 commit 2c1cb76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/paypal/nvp/request.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def post(method, params)
5050
def handle_response
5151
response = yield
5252
response = CGI.parse(response).inject({}) do |res, (k, v)|
53-
res.merge!(k.to_sym => v.first)
53+
res.merge!(k.to_sym => v.first.to_s)
5454
end
5555
case response[:ACK]
5656
when 'Success', 'SuccessWithWarning'

0 commit comments

Comments
 (0)