# File lib/active_merchant/billing/integrations/chronopay/helper.rb, line 36 36: def initialize(order, account, options = {}) 37: super 38: add_field('cb_type', 'p') 39: end
# File lib/active_merchant/billing/integrations/chronopay/helper.rb, line 71 71: def billing_address(mapping = {}) 72: # Gets the country code in the appropriate format or returns what we were given 73: # The appropriate format for Chronopay is the alpha 3 country code 74: country_code = lookup_country_code(mapping.delete(:country)) 75: add_field(mappings[:billing_address][:country], country_code) 76: 77: countries_with_supported_states = ['USA', 'CAN'] 78: if !countries_with_supported_states.include?(country_code) 79: mapping.delete(:state) 80: add_field(mappings[:billing_address][:state], 'XX') 81: end 82: mapping.each do |k, v| 83: field = mappings[:billing_address][k] 84: add_field(field, v) unless field.nil? 85: end 86: add_field('language', checkout_language_from_country(country_code)) 87: end
cs2 cs3 decline_url
# File lib/active_merchant/billing/integrations/chronopay/helper.rb, line 109 109: def checkout_language_from_country(country_code) 110: country = Country.find(country_code) 111: short_code = country.code(:alpha2).to_s 112: LANG_FOR_COUNTRY[short_code] 113: rescue InvalidCountryCodeError 114: 'EN' 115: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.