| @@ 62-65 (lines=4) @@ | ||
| 59 | ||
| 60 | # Returns True if the MD5 hash found in the response payload validates using |
|
| 61 | # the supplied api_login and secret merchant_value (THIS IS NOT YOUR API KEY). |
|
| 62 | def valid_md5?(api_login, merchant_value) |
|
| 63 | return false if @fields[:md5_hash].nil? |
|
| 64 | @@digest.hexdigest("#{merchant_value}#{api_login}#{@fields[:transaction_id]}#{@transaction.fields[:amount]}").casecmp(@fields[:md5_hash]).zero? |
|
| 65 | end |
|
| 66 | ||
| 67 | # Returns the current API version that we are adhering to. |
|
| 68 | attr_reader :version |
|
| @@ 27-30 (lines=4) @@ | ||
| 24 | ||
| 25 | # Returns True if the MD5 hash found in the response payload validates using |
|
| 26 | # the supplied api_login and secret merchant_value (THIS IS NOT YOUR API KEY). |
|
| 27 | def valid_md5?(api_login, merchant_value) |
|
| 28 | return false if @fields[:MD5_Hash].nil? |
|
| 29 | @@digest.hexdigest("#{merchant_value}#{api_login}#{@fields[:trans_id]}#{@fields[:amount]}").casecmp(@fields[:MD5_Hash]).zero? |
|
| 30 | end |
|
| 31 | ||
| 32 | # Returns an HTML string that can be returned to the gateway during the Relay Response, |
|
| 33 | # and will send the user on to URL you specify. Takes a hash of options, currently the |
|