def build_post_url
      @optional.map { |k, v| @parameters[k] = v unless v.nil? }
      @parameters['Timestamp'] = Time.now.utc.iso8601 unless @parameters.key?('Timestamp')
      @parameters = @default_hash.merge(@parameters)
      post_url = @parameters.sort.map { |k, v| "#{k}=#{custom_escape(v)}" }.join('&')
      post_body = ['POST', @mws_endpoint.to_s, "/#{@sandbox_str}/#{AmazonPay::API_VERSION}", post_url].join("\n")
      post_url += '&Signature=' + sign(post_body)
      if @log_enabled
        data = AmazonPay::Sanitize.new(post_url)
        @logger.debug("request/Post: #{data.sanitize_request_data}")
      end

      post_url
    end
def build_post_url
      @optional.map { |k, v| @parameters[k] = v unless v.nil? }
      @parameters['Timestamp'] = Time.now.utc.iso8601 unless @parameters.key?('Timestamp')
      @parameters = @default_hash.merge(@parameters)
      post_url = @parameters.sort.map { |k, v| "#{k}=#{custom_escape(v)}" }.join('&')
      post_body = ['POST', @mws_endpoint.to_s, "/#{@sandbox_str}/#{AmazonPay::API_VERSION}", post_url].join("\n")
      post_url += '&Signature=' + sign(post_body)
      if @log_enabled
        data = AmazonPay::Sanitize.new(post_url)
        @logger.debug("request/Post: #{data.sanitize_request_data}")
      end

      post_url
    end
This method combines the required and optional
 parameters to sign the post body and generate
 the post url.