add support to milti transaction

This commit is contained in:
2026-01-13 03:18:05 -03:00
parent ad23e9aa51
commit da10a36a1d
11 changed files with 287 additions and 56 deletions

View File

@@ -71,6 +71,7 @@ class Order(BaseModel):
address: Address
items: tuple[Item, ...]
payment_method: PaymentMethod
discount: Decimal = Decimal('0')
cpf: str | None = None
cnpj: str | None = None
@@ -127,6 +128,7 @@ class Iugu:
}
for item in order.items
]
payload = {
'order_id': order.id,
'external_reference': order.id,
@@ -135,6 +137,7 @@ class Iugu:
'email': order.email,
'payable_with': order.payment_method.lower(),
'notification_url': postback_url.geturl(),
'discount_cents': int(order.discount * -100),
'payer': {
'name': order.name,
'email': order.email,