Included Modules

Class Index [+]

Quicksearch

ActiveMerchant::Billing::Integrations::Gestpay::Helper

Public Class Methods

new(order, account, options = {}) click to toggle source

Valid language codes

  Italian           => 1
  English               => 2
  Spanish               => 3
  French    => 4
  Tedesco   => 5
    # File lib/active_merchant/billing/integrations/gestpay/helper.rb, line 13
13:           def initialize(order, account, options = {})
14:             super
15:             add_field('PAY1_IDLANGUAGE', 2)
16:           end

Public Instance Methods

currency=(currency_code) click to toggle source
    # File lib/active_merchant/billing/integrations/gestpay/helper.rb, line 38
38:           def currency=(currency_code)
39:             code = CURRENCY_MAPPING[currency_code]
40:                                         raise StandardError, "Invalid currency code #{currency_code} specified" if code.nil?
41:                                         
42:                                         add_field(mappings[:currency], code)
43:           end
customer(params = {}) click to toggle source
    # File lib/active_merchant/billing/integrations/gestpay/helper.rb, line 33
33:           def customer(params = {})
34:             add_field(mappings[:customer][:email], params[:email])
35:             add_field('PAY1_CHNAME', "#{params[:first_name]} #{params[:last_name]}")
36:           end
encryption_query_string() click to toggle source
    # File lib/active_merchant/billing/integrations/gestpay/helper.rb, line 59
59:           def encryption_query_string
60:             fields = ['PAY1_AMOUNT', 'PAY1_SHOPTRANSACTIONID', 'PAY1_UICCODE']
61:           
62:             encoded_params = fields.collect{ |field| "#{field}=#{CGI.escape(@fields[field])}" }.join(DELIMITER)
63:           
64:             "#{ENCRYPTION_PATH}?a=" + CGI.escape(@fields['ShopLogin']) + "&b=" + encoded_params + "&c=" + CGI.escape(VERSION)
65:           end
form_fields() click to toggle source
    # File lib/active_merchant/billing/integrations/gestpay/helper.rb, line 45
45:           def form_fields
46:             @encrypted_data ||= get_encrypted_string
47:                       
48:             {
49:               'a' => @fields['ShopLogin'],
50:               'b' => @encrypted_data
51:             }
52:           end
get_encrypted_string() click to toggle source
    # File lib/active_merchant/billing/integrations/gestpay/helper.rb, line 54
54:           def get_encrypted_string
55:             response = ssl_get(Gestpay.service_url, encryption_query_string)
56:             parse_response(response)
57:           end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.