Answer the question
In order to leave comments, you need to log in
Problems with parsing ruby syntax, what does it mean?
There is a function in Ruby:
def signature h
sorted_params = h.to_a.sort{|x, y| x[0].to_s <=> y[0].to_s} #1
s = ""
sorted_params.each{|k, v| s += "#{k}=#{v}"} #2
s += "62f8"
sig = Digest::MD5.hexdigest(s)
sig
end
Answer the question
In order to leave comments, you need to log in
Sorted by key: php.net/manual/en/function.ksort.php Spliced
into string key1=value1key2=value2key3=value3
Secret key 62f8 added at the end
Considered md5 php.net/manual/en/function.md5.php Must
be watched on the documentation of the payment (apparently) system for which this code, and not in the code itself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question