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:
@@ -205,6 +205,22 @@ Usuários. Use a sending domain with SPF and DKIM, or the messages land in spam.
|
||||
opens by hand (CDR, AI, PSD, TIFF); 500 is R$ 5,00 a metro. Change it only on
|
||||
the client's instruction; the Site shows the new price after the redeploy.
|
||||
|
||||
## 8. Correios
|
||||
|
||||
PAC and SEDEX appear in the cart once `CORREIOS_CODIGO_ACESSO` (the CWS access
|
||||
code, a secret) is set in the stack and the stack redeployed. The user, posting
|
||||
card and contract are Dropstar's and already the stack's defaults. Then, from
|
||||
the worker's console:
|
||||
|
||||
```bash
|
||||
python -m app.correios_probe
|
||||
```
|
||||
|
||||
It shows the token's contract and DR and prices PAC and SEDEX to a few CEPs.
|
||||
If a service is refused, the contract uses other codes: set `CORREIOS_COD_PAC`
|
||||
or `CORREIOS_COD_SEDEX`. Correios price by the box, so `JADLOG_CAIXA_CM` and the
|
||||
package weights must be set (they already are for Jadlog).
|
||||
|
||||
## Current blocker
|
||||
|
||||
This is the final deployment shape, but it is not authorized for production
|
||||
|
||||
Reference in New Issue
Block a user