Business logic
components.payment_gateway.internal.business_logic.helpers ¶
raise_on_inconsistent_workspace_keys ¶
Helper to raise an InconsistentWorkspaceKeysException when the workspace keys are inconsistent
Source code in components/payment_gateway/internal/business_logic/helpers.py
raise_on_provider_not_in ¶
Same as raise_on_provider_not_supported but allows any of a set of providers.
Source code in components/payment_gateway/internal/business_logic/helpers.py
raise_on_provider_not_supported ¶
Helper to raise: - ProviderNotSupportedException when the provider is not supported - WorkspaceNotRegisteredException when the workspace is not registered
Source code in components/payment_gateway/internal/business_logic/helpers.py
components.payment_gateway.internal.business_logic.queries ¶
psp_account_balances ¶
PspAccountBalancesResult
dataclass
¶
get_psp_account_balances ¶
Return account balances across the given PSP workspaces, tagged by workspace.
Resilient to per-PSP failures: an error fetching one workspace (e.g. a PSP HTTP 500) records that workspace as failed instead of breaking the whole call.
Args: - workspaces: Workspace keys to fetch balances for.
- A
PspAccountBalancesResultholding the successful(workspace, balance)pairs and the workspaces that failed. Workspaces whose provider is not registered are silently skipped (config, not a failure).
Source code in components/payment_gateway/internal/business_logic/queries/psp_account_balances.py
webhook_log_queries ¶
get_latest_webhook_log_by_external_id ¶
Get webhook log by id, a webhook log is a record of a webhook payload sent to the payment gateway from Adyen
Args: - webhook_id: The internal id of the webhook log to fetch
- WebhookLog: The webhook log record
- id: The internal id of the webhook log
- payload: The raw content of the webhook payload from Adyen
Source code in components/payment_gateway/internal/business_logic/queries/webhook_log_queries.py
get_webhook_log ¶
Get webhook log by id, a webhook log is a record of a webhook payload sent to the payment gateway from Adyen
Args: - webhook_id: The internal id of the webhook log to fetch
- WebhookLog: The webhook log record
- id: The internal id of the webhook log
- payload: The raw content of the webhook payload from Adyen