fix: honor PayKilla invoice currency

This commit is contained in:
3252a8
2026-06-04 15:24:23 +03:00
parent cd4b40af6b
commit 8d6f91b292
5 changed files with 30 additions and 7 deletions
+14
View File
@@ -260,6 +260,20 @@ class PaykillaServiceTests(unittest.TestCase):
self.assertRegex(body["purpose"], r"^[A-Za-z0-9_\s.,]+$")
self.assertNotIn("urls", body)
def test_invoice_body_uses_configured_paykilla_currency(self):
service = self._make_service()
service.config.CURRENCY = "USD"
body = service._invoice_body(
payment_db_id=556,
amount=100,
currency="RUB",
description="ignored",
)
self.assertEqual(body["currency"], "USD")
self.assertEqual(body["type"], "FIAT_BASED")
def test_invoice_body_omits_redirect_urls(self):
service = self._make_service()