Sha256: ad18f110bb865bdaffca0e473907ea8dbdd9c39d92b3d27af16c094c9e632d1c
Contents?: true
Size: 922 Bytes
Versions: 12
Compression:
Stored size: 922 Bytes
Contents
module ActiveMerchant #:nodoc: module Billing #:nodoc: module Integrations #:nodoc: class Return attr_accessor :params attr_reader :notification def initialize(query_string, options = {}) @params = parse(query_string) @options = options end # Successful by default. Overridden in the child class def success? true end def message end def parse(query_string) return {} if query_string.blank? query_string.split('&').inject({}) do |memo, chunk| next if chunk.empty? key, value = chunk.split('=', 2) next if key.empty? value = value.nil? ? nil : CGI.unescape(value) memo[CGI.unescape(key)] = value memo end end end end end end
Version data entries
12 entries across 12 versions & 3 rubygems