fix: a Site payment lands in Tiny's MERCADO PAGO account, and card uses the forma de recebimento Marcus gave (2026-12-01)
All checks were successful
Build and deploy / Validate source (push) Successful in 52s
Build and deploy / Integration suite on a real stack (push) Successful in 8m3s
Build and deploy / Secret scan and release gate (push) Successful in 9s
Build and deploy / Publish images (push) Successful in 1m21s
All checks were successful
Build and deploy / Validate source (push) Successful in 52s
Build and deploy / Integration suite on a real stack (push) Successful in 8m3s
Build and deploy / Secret scan and release gate (push) Successful in 9s
Build and deploy / Publish images (push) Successful in 1m21s
Pix and card paid on the Site carry meioPagamento 977344550 on their installment; an order the team registered as paid outside, the customer's credit and the boleto keep theirs. Cartão de crédito is 919478945 (the 977460722 read from a store order on 19/10 was not it). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
13
app/tiny.py
13
app/tiny.py
@@ -144,9 +144,16 @@ PICKUP_EXACT = 'retirar pessoalmente'
|
||||
# "CORREÇÃO DTF", used for it before, is for correction orders only. "Boleto" is
|
||||
# for a montador Venda order (front 7a.3); no id is known yet, and while
|
||||
# TINY_RECEIPT_BOLETO is empty the order goes without a forma de recebimento.
|
||||
# Cartão de crédito is 919478945 (Marcus, 2026-12-01; 977460722, read from a
|
||||
# store order on 2026-10-19, was not the forma he names).
|
||||
_BOLETO = os.environ.get('TINY_RECEIPT_BOLETO', '').strip()
|
||||
RECEIPT_METHODS = {'pix': 919478952, 'card': 977460722, 'cash': 919478944, 'credit': 987762591,
|
||||
RECEIPT_METHODS = {'pix': 919478952, 'card': 919478945, 'cash': 919478944, 'credit': 987762591,
|
||||
**({'faturado': int(_BOLETO)} if _BOLETO.isdigit() else {})}
|
||||
# The account ("meio de pagamento") a Site payment lands in: MERCADO PAGO, the
|
||||
# one the store's orders use (Marcus, 2026-12-01; not "MERCADO PAGO - NÃO
|
||||
# USAR", 987326894). Only Pix and card paid on the Site, through Mercado Pago.
|
||||
MERCADO_PAGO_ACCOUNT = 977344550
|
||||
SITE_PAID = ('pix', 'card')
|
||||
PICKUP_CARRIER = 761565838
|
||||
# Dropstar's answers: the financial category "DTF SITE" (RECEITAS, id sent on
|
||||
# 2026-10-26; it goes in pagamento.categoria, and replaced the store's
|
||||
@@ -665,6 +672,10 @@ def order_payload(payload, contact_id, today=None, product_id=None, shipping=Non
|
||||
account = setting('TINY_BOLETO_ACCOUNT')
|
||||
if method == 'faturado' and account.isdigit():
|
||||
parcela['meioPagamento'] = {'id': int(account)}
|
||||
# Paid on the Site: the money is in the Mercado Pago account. An order
|
||||
# the team registered as paid outside (D-35) names no account.
|
||||
elif method in SITE_PAID and not (payload.get('payment') or {}).get('outside'):
|
||||
parcela['meioPagamento'] = {'id': MERCADO_PAGO_ACCOUNT}
|
||||
pedido['pagamento'].update({'formaRecebimento': {'id': received}, 'parcelas': [parcela]})
|
||||
destination = order.get('destination')
|
||||
if destination:
|
||||
|
||||
Reference in New Issue
Block a user