feat: update logger logic
This commit is contained in:
@@ -26,11 +26,12 @@ class ItPayClient(IItPayService):
|
||||
self._api_secret = api_secret
|
||||
self._timeout = ClientTimeout(total=timeout_seconds)
|
||||
|
||||
async def create_payment(self, order: OrderEntity) -> OrderEntity:
|
||||
async def create_payment(self, order: OrderEntity, trace_id: str) -> OrderEntity:
|
||||
total = order.total_price if order.total_price is not None else Decimal('0')
|
||||
amount = total if isinstance(total, Decimal) else Decimal(str(total))
|
||||
amount_str = str(amount.quantize(Decimal('0.01')))
|
||||
metadata: dict[str,Any] = {
|
||||
'trace_id': trace_id,
|
||||
'order_id': order.id,
|
||||
'user_id': order.user_id,
|
||||
'usdt_amount': str(order.usdt_amount) if order.usdt_amount is not None else None,
|
||||
|
||||
Reference in New Issue
Block a user