adyen.settings_config module

class adyen.settings_config.FromSettingsConfig

Bases: adyen.config.AbstractAdyenConfig

Manage Plugin’s configuration from the project’s settings.

It gets all information required by the plugin from the project’s settings, and can be used as a base class for specific cases.

The expected settings are:

get_action_url(request)

Return ADYEN_ACTION_URL.

get_allowed_methods(request, source_type=None)

Return ADYEN_ALLOWED_METHODS or None.

Parameters:
  • request – Django HTTP request object.
  • source_type – A SourceType object or None.

If the setting is not configured, the default value None is returned instead. It means the application does not specify any allowed methods so customers can select a payment methods on the Adyen HPP itself.

Note that both request and source_type parameters are ignored and only the setting matters.

get_identifier(request)

Return ADYEN_IDENTIFIER.

get_ip_address_header()

Return ADYEN_IP_ADDRESS_HTTP_HEADER or REMOTE_ADDR.

If the setting is not configured, the default value REMOTE_ADDR is returned instead.

get_signer_backend(request)

Return ADYEN_SIGNER_BACKEND or adyen.signers.HMACSha1

get_skin_code(request)

Return ADYEN_SKIN_CODE.

get_skin_secret(request)

Return ADYEN_SECRET_KEY.