lib/sberbank/acquiring/request.rb in sberbank-acquiring-0.2.1 vs lib/sberbank/acquiring/request.rb in sberbank-acquiring-1.0.0

- old
+ new

@@ -19,16 +19,19 @@ @path = path @test = test end def build_uri - URI::HTTPS.build(host: host, path: path, query: URI.encode_www_form(params)) + URI::HTTPS.build(host: host, path: path) end def perform uri = build_uri Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http| - @http_request = Net::HTTP::Get.new(uri) + @http_request = Net::HTTP::Post.new(uri) + @http_request['Content-Type'] = 'application/x-www-form-urlencoded' + @http_request.body = URI.encode_www_form(params) + @response = Response.new(http_response: http.request(@http_request), request: self) end end end end