feat: the cart offers Correios PAC and SEDEX next to Jadlog
All checks were successful
Build and deploy / Validate source (push) Successful in 1m48s
Build and deploy / Integration suite on a real stack (push) Successful in 4m25s
Build and deploy / Secret scan and release gate (push) Successful in 15s
Build and deploy / Publish images (push) Successful in 1m54s
All checks were successful
Build and deploy / Validate source (push) Successful in 1m48s
Build and deploy / Integration suite on a real stack (push) Successful in 4m25s
Build and deploy / Secret scan and release gate (push) Successful in 15s
Build and deploy / Publish images (push) Successful in 1m54s
Dropstar sent its Correios contract. The cart now asks every carrier at once for the CEP and lists each option with its delivery time, cheapest first and chosen by default: Jadlog .PACKAGE, Correios PAC and Correios SEDEX, plus pickup. A carrier that does not answer is left out instead of blocking the others, and the server quotes the customer's choice again at approval. The order summary, the Kanban and Minha conta name the carrier chosen. app/correios.py follows the CWS manuals: a token from the posting card (kept until shortly before it expires, renewed once if refused), the contract's own prices by its DR, and the delivery time. Each box is one object priced by its sides; Correios work out the cubic weight. All carriers price the same package, now in app/package.py. Only CORREIOS_CODIGO_ACESSO goes in the stack; the user, card and contract are its defaults. python -m app.correios_probe checks the contract and its service codes on the account. Tested: tests/test_correios (token, contract parameters, prices in Brazilian format, boxes, a code override, a failing carrier), the full suite in a CI-style stack, and the cart in Brave on desktop and phone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,17 @@ x-app-environment: &app-environment
|
||||
JADLOG_METROS_POR_CAIXA: ${JADLOG_METROS_POR_CAIXA:-}
|
||||
# Working days of production added to Jadlog's delivery time.
|
||||
FREIGHT_PRODUCTION_DAYS: ${FREIGHT_PRODUCTION_DAYS:-0}
|
||||
# Correios PAC and SEDEX, on when CORREIOS_CODIGO_ACESSO (the CWS access
|
||||
# code, a secret: set it in the stack) is set. They price the package above
|
||||
# (weights and JADLOG_CAIXA_CM). The rest is Dropstar's contract, not secret.
|
||||
CORREIOS_CODIGO_ACESSO: ${CORREIOS_CODIGO_ACESSO:-}
|
||||
CORREIOS_USUARIO: ${CORREIOS_USUARIO:-8825364223}
|
||||
CORREIOS_CARTAO: ${CORREIOS_CARTAO:-0076691373}
|
||||
CORREIOS_CONTRATO: ${CORREIOS_CONTRATO:-9912551407}
|
||||
# Only if the contract's codes differ from 03298 (PAC) and 03220 (SEDEX);
|
||||
# python -m app.correios_probe shows whether they price.
|
||||
CORREIOS_COD_PAC: ${CORREIOS_COD_PAC:-}
|
||||
CORREIOS_COD_SEDEX: ${CORREIOS_COD_SEDEX:-}
|
||||
# A cart the Site priced is approved at checkout and can be paid at once;
|
||||
# orders above QUOTE_AUTO_MAX_METRES, or with a grade the Site did not
|
||||
# compute, wait for an operator on the Kanban (app/quote_review.py).
|
||||
|
||||
Reference in New Issue
Block a user