Class Index [+]

Quicksearch

ActiveMerchant::Billing::Integrations::Quickpay::Helper

Constants

MD5_CHECK_FIELDS

Public Class Methods

new(order, account, options = {}) click to toggle source
    # File lib/active_merchant/billing/integrations/quickpay/helper.rb, line 7
 7:           def initialize(order, account, options = {})
 8:             super
 9:             add_field('protocol', '3')
10:             add_field('msgtype', 'authorize')
11:             add_field('language', 'da')
12:             add_field('autocapture', 0)
13:             add_field('testmode', 0)
14:             add_field('ordernumber', format_order_number(order))
15:           end

Public Instance Methods

form_fields() click to toggle source
    # File lib/active_merchant/billing/integrations/quickpay/helper.rb, line 21
21:           def form_fields
22:             @fields.merge('md5check' => generate_md5check)
23:           end
format_order_number(number) click to toggle source

Limited to 20 digits max

    # File lib/active_merchant/billing/integrations/quickpay/helper.rb, line 34
34:           def format_order_number(number)
35:             number.to_s.gsub(/[^\w_]/, '').rjust(4, "0")[0...20]
36:           end
generate_md5check() click to toggle source
    # File lib/active_merchant/billing/integrations/quickpay/helper.rb, line 29
29:           def generate_md5check
30:             Digest::MD5.hexdigest(generate_md5string)
31:           end
generate_md5string() click to toggle source
    # File lib/active_merchant/billing/integrations/quickpay/helper.rb, line 25
25:           def generate_md5string
26:             MD5_CHECK_FIELDS.map {|key| @fields[key.to_s]} * "" + @md5secret
27:           end
md5secret(value) click to toggle source
    # File lib/active_merchant/billing/integrations/quickpay/helper.rb, line 17
17:           def md5secret(value)
18:             @md5secret = value
19:           end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.