lib/wayforpay/request.rb in wayforpay-0.1.1 vs lib/wayforpay/request.rb in wayforpay-0.1.2

- old
+ new

@@ -1,11 +1,11 @@ require 'json' require 'net/http' module Wayforpay class Request - def self.call(encrypted_fields, request_attrs) - request_attrs[:merchantSignature] = EncryptField.(encrypted_fields, request_attrs) - Net::HTTP.post(Constants::URL, request_attrs.to_json) + def self.call(encrypted_fields = [], request_params = {}) + request_params[:merchantSignature] = EncryptField.(encrypted_fields, request_params) + Net::HTTP.post(Constants::URL, request_params.to_json) end end end