Добавлена отправка NotificationURL и SuccessURL

This commit is contained in:
Раис Юсупалиев
2026-04-18 00:58:13 +03:00
parent bddac60965
commit 78e9ad4fa9
18 changed files with 252 additions and 3 deletions
+8
View File
@@ -20,6 +20,8 @@ class TBankAdapter:
http_client: httpx.AsyncClient,
*,
init_url: str,
notification_url: str,
success_url: str,
terminal_key: str,
password: str,
timeout_seconds: float = 10.0,
@@ -29,6 +31,8 @@ class TBankAdapter:
) -> None:
self._http_client = http_client
self._init_url = init_url
self._notification_url = notification_url
self._success_url = success_url
self._terminal_key = terminal_key
self._password = password
self._timeout_seconds = timeout_seconds
@@ -46,6 +50,8 @@ class TBankAdapter:
return cls(
http_client=http_client,
init_url=config.init_url,
notification_url=config.notification_url,
success_url=config.success_url,
terminal_key=config.auth.terminal_key,
password=config.auth.password,
timeout_seconds=config.timeout_seconds,
@@ -116,6 +122,8 @@ class TBankAdapter:
"TerminalKey": self._terminal_key,
"Amount": amount_kopecks,
"OrderId": order_uuid,
"NotificationURL": self._notification_url,
"SuccessURL": self._success_url,
}
payload["Token"] = _build_tbank_token(payload, password=self._password)
return payload