config/initializers/fields.rb in workarea-klarna-1.0.0 vs config/initializers/fields.rb in workarea-klarna-1.1.0.beta1

- old
+ new

@@ -22,22 +22,44 @@ # Klarna accounts for some or all sites. # field 'Europe Username', type: :string, id: 'klarna_eur_username', - description: 'Your Klarna API username for Europe' + description: 'Your Klarna API username for Europe', + allow_blank: true field 'Europe Password', type: :string, id: 'klarna_eur_password', encrypted: true, - description: 'Your Klarna API password for Europe' + description: 'Your Klarna API password for Europe', + allow_blank: true field 'North America Username', type: :string, id: 'klarna_na_username', - description: 'Your Klarna API username for North America' + description: 'Your Klarna API username for North America', + allow_blank: true field 'North America Password', type: :string, id: 'klarna_na_password', encrypted: true, - description: 'Your Klarna API password for North America' + description: 'Your Klarna API password for North America', + allow_blank: true + + field 'On-Site Messaging Client ID', + type: :string, + id: 'klarna_on_site_messaging_client_id', + allow_blank: true, + description: %{ + The client ID provided by Klarna when enabling On-Site Messaging in the + Klarna merchant portal. See + <a href="https://developers.klarna.com/documentation/on-site-messaging/integration/platform-activation/">the Klarna documentation</a> + for more information. + }.squish.html_safe + + field 'On-Site Messaging Region', + type: :string, + id: 'klarna_on_site_messaging_region', + default: -> { Workarea.config.klarna_continent_keys.values.first }, + values: -> { Workarea.config.klarna_continent_keys.to_a }, + description: 'Region to use for contacting klarna for on-site messaging' end end