fix: update recept

This commit is contained in:
2026-05-09 11:22:44 +03:00
parent ea0ca899ac
commit 3dfde69a3e
3 changed files with 26 additions and 24 deletions

View File

@@ -40,9 +40,9 @@ class ClaudeKassirClient(IReceipt):
total_amount: Decimal,
principal_amount: Decimal,
service_fee: Decimal,
phone: str | None = None,
supplier_name: str = '',
supplier_inn: str = '',
customer_info: str = '',
customer_inn: str = '',
customer_birthday: str = '',
success_url: str | None = None,
fail_url: str | None = None,
request_id: str | None = None,
@@ -71,13 +71,13 @@ class ClaudeKassirClient(IReceipt):
'method': 4,
'object': 4,
'measurement_unit': 'шт',
'agent_info': {
'type': 6,
'agentSign': 6,
'agentData': {
'agentOperationName': 'Исполнение поручения принципала',
},
'supplier_info': {
'phones': [phone] if phone else [],
'name': supplier_name,
'inn': supplier_inn,
'purveyorData': {
'name': 'Elcsa',
'inn': self._inn,
},
},
{
@@ -87,7 +87,7 @@ class ClaudeKassirClient(IReceipt):
'amount': float(fee),
'vat': 0,
'method': 4,
'object': 4,
'object': 11,
'measurement_unit': 'шт',
},
],
@@ -98,14 +98,14 @@ class ClaudeKassirClient(IReceipt):
'provision': 0,
},
'email': email,
'phone': phone,
'customerInfo': customer_info,
'customerInn': customer_inn,
'customerBirthday': customer_birthday,
},
'Email': email,
'SuccessUrl': success_url or self._success_url,
'FailUrl': fail_url or self._fail_url,
}
if phone is None:
payload['CustomerReceipt'].pop('phone')
if payload['SuccessUrl'] is None:
payload.pop('SuccessUrl')
if payload['FailUrl'] is None: