ActiveMerchant::Billing::Integrations::Helper
# File lib/active_merchant/billing/integrations/quickpay/helper.rb, line 7 def initialize(order, account, options = {}) super add_field('protocol', '3') add_field('msgtype', 'authorize') add_field('language', 'da') add_field('autocapture', 0) add_field('testmode', 0) add_field('ordernumber', format_order_number(order)) end
# File lib/active_merchant/billing/integrations/quickpay/helper.rb, line 21 def form_fields @fields.merge('md5check' => generate_md5check) end
Limited to 20 digits max
# File lib/active_merchant/billing/integrations/quickpay/helper.rb, line 34 def format_order_number(number) number.to_s.gsub(/[^\w_]/, '').rjust(4, "0")[0...20] end
# File lib/active_merchant/billing/integrations/quickpay/helper.rb, line 29 def generate_md5check Digest::MD5.hexdigest(generate_md5string) end
Generated with the Darkfish Rdoc Generator 2.