Permalink
Browse files

Remove #set_form_data from #send_back request

  • Loading branch information...
maxbeizer committed Mar 15, 2014
1 parent a77f69c commit a2d132ae7d401c6211cc678455f0b40865b8056c
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/paypal_adaptive/ipn_notification.rb
@@ -33,7 +33,12 @@ def send_back(data)
http.ca_file = @ssl_cert_file unless @ssl_cert_file.blank?
req = Net::HTTP::Post.new(url.request_uri)
req.set_form_data(Rack::Utils.parse_nested_query(data))
# we don't want #set_form_data to create a hash and get our
# response out of order; Paypal IPN docs explicitly state that
# the contents of #send_back must be in the same order as they
# were recieved
req.body = data
req.content_type = 'application/x-www-form-urlencoded'
req['Accept-Encoding'] = 'identity'
response_data = http.request(req).body

0 comments on commit a2d132a

Please sign in to comment.