fix: test command

This commit is contained in:
2026-05-09 00:14:12 +03:00
parent 22f27fa524
commit be8aee7b73
8 changed files with 126 additions and 44 deletions

View File

@@ -39,6 +39,9 @@ class ItPayClient(IItPayService):
'service_fee': str(order.service_fee) if order.service_fee is not None else None,
'amount': amount_str,
}
if order.total_price is not None and order.service_fee is not None:
principal = (Decimal(str(order.total_price)) - Decimal(str(order.service_fee))).quantize(Decimal('0.01'))
metadata['principal_amount'] = str(principal)
metadata = {k:v for k,v in metadata.items() if v is not None and v != ''}
payload: dict[str, Any] = {
'amount': amount_str,