Closed danieldocki closed 12 years ago
I need to inform each creating the url-retorno?
def analysis_parameters(parameters={}) [:numero, :valor, :bandeira, :"url-retorno"].each do |parameter| raise Cielo::MissingArgumentError, "Required parameter #{parameter} not found" unless parameters[parameter] end parameters.merge!(:moeda => "986") unless parameters[:moeda] parameters.merge!(:"data-hora" => Time.now.strftime("%Y-%m-%dT%H:%M:%S")) unless parameters[:"data-hora"] parameters.merge!(:idioma => "PT") unless parameters[:idioma] parameters.merge!(:produto => "1") unless parameters[:produto] parameters.merge!(:parcelas => "1") unless parameters[:parcelas] parameters.merge!(:autorizar => "2") unless parameters[:autorizar] parameters.merge!(:capturar => "true") unless parameters[:capturar] parameters.merge!(:"url-retorno" => Cielo.return_path) unless parameters[:"url-retorno"] parameters end
You can specify it on your environment files and use it there. In all cases I use the url-retorno is different, because I add the product id, so when the callback happens I know what product it is.
I need to inform each creating the url-retorno?