Классы для инициализации

class aiopayAPI.config.PayConfig(*, API_ID: int, API_KEY: str, shop: int, json_file: str | None = None, error: bool = False)

Конфиг для класса PayOk

Параметры:
  • API_ID (int) – ID ключа

  • API_KEY (str) – API Ключ

  • shop (int) – ID магазина

  • json_file (str, опционально) – JSON файл для записи ответов

  • error (bool, опционально) – Обработка ошибок (boolean, default=False)

API_ID: int

ID ключа

API_KEY: str

API Ключ

shop: int

ID магазина

json_file: str | None

JSON файл для записи ответов

error: bool

Обработка ошибок (boolean, default=False)

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'API_ID': FieldInfo(annotation=int, required=True), 'API_KEY': FieldInfo(annotation=str, required=True), 'error': FieldInfo(annotation=bool, required=False, default=False), 'json_file': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'shop': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class aiopayAPI.config.QuickConfig(*, amount: float, shop: int, desc: str, currency: str, secret: str, payment: int, json_file: str | None = None, error: bool = False)

Конфиг для класса QuickPay

amount: float

Сумма оплаты

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'amount': FieldInfo(annotation=float, required=True), 'currency': FieldInfo(annotation=str, required=True), 'desc': FieldInfo(annotation=str, required=True), 'error': FieldInfo(annotation=bool, required=False, default=False), 'json_file': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'payment': FieldInfo(annotation=int, required=True), 'secret': FieldInfo(annotation=str, required=True), 'shop': FieldInfo(annotation=int, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

shop: int

ID магазина

desc: str

Описание платежа

currency: str

Валюта платежа (RUB, USD, EUR и тд)

secret: str

Секретный ключ

payment: int

ID платежа в вашей системе (нужен для проверки оплаты)

json_file: str | None

JSON файл для записи ответов запросов

error: bool

Обработка ошибок (boolean, default=False)