billing_address (ActiveMerchant::Billing::Integrations::Chronopay::Helper)

    # File lib/active_merchant/billing/integrations/chronopay/helper.rb, line 44
              def billing_address(mapping = {})
                # Gets the country code in the appropriate format or returns what we were given
                # The appropriate format for Chronopay is the alpha 3 country code
                country_code = lookup_country_code(mapping.delete(:country))
                add_field(mappings[:billing_address][:country], country_code)

                countries_with_supported_states = ['USA', 'CAN']
                if !countries_with_supported_states.include?(country_code)
                  mapping.delete(:state)
                  add_field(mappings[:billing_address][:state], 'XX')
                end
                mapping.each do |k, v|
                  field = mappings[:billing_address][k]
                  add_field(field, v) unless field.nil?
                end
              end