Skip to content

Close INV-10: remove simulate-payment PAN/CVC route - #22

Open
sokanacollectiveCRM wants to merge 331 commits into
disc-template:mainfrom
sokanacollectiveCRM:fix/hipaa-inv10-simulate-payment-removal
Open

Close INV-10: remove simulate-payment PAN/CVC route#22
sokanacollectiveCRM wants to merge 331 commits into
disc-template:mainfrom
sokanacollectiveCRM:fix/hipaa-inv10-simulate-payment-removal

Conversation

@sokanacollectiveCRM

Copy link
Copy Markdown

Summary

  • Unmount POST /quickbooks/simulate-payment and delete server-side PAN/CVC charge modules (paymentsController, createCharge, buildChargePayload, simulate-payment API).
  • Retain approved tokenized card-on-file path: POST /api/payment-methods with intuit_token + request_id.
  • Add negative containment tests (simulatePaymentRouteDisabled.test.ts, 11 cases) and production verification script (scripts/verify-inv10-simulate-payment-prod.ts).
  • Update auth matrix and sign-off doc (docs/HIPAA_INV10_SIMULATE_PAYMENT_SIGNOFF.md).

Test plan

  • npm test -- --testPathPattern="simulatePaymentRouteDisabled|authorizationMatrix|paymentMethodsMount" — 38/38 pass
  • Merge + deploy to sokana-private-api
  • Post-deploy: BACKEND_URL=https://sokana-private-api-....run.app npx tsx scripts/verify-inv10-simulate-payment-prod.ts
  • Confirm POST /api/quickbooks/simulate-payment → 404 (admin + unauthenticated)
  • Confirm POST /api/payment-methods still mounted (401 unauthenticated; not 404)
  • Fill production revision/commit in sign-off doc and complete formal sign-off

Made with Cursor

sokanacollectiveCRM and others added 24 commits August 10, 2026 20:30
…es-api

Expose contract templates API for Contracts page
Protect auth, webhooks, and public intake; keep staff roles in Cloud SQL; add CI/Cloud Build test gates so a merge to main can deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
Repo-wide prettier/eslint is not clean yet; the workflow was failing on thousands of legacy files. Scope the GitHub lint job to this change set so the P0 deploy PR can pass.

Co-authored-by: Cursor <cursoragent@cursor.com>
…dening

P0 security hardening for Cloud Run deploy
Phones still need the frontend header-token fallback; this only helps browsers that honor CHIPS.
Persist home intake fields on operational updates, merge them in GET/PUT responses, expand PHI field aliases, and fall back to Cloud SQL when the PHI broker is unreachable in primary mode.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…me-type

Fix client profile saves for home type and PHI broker fallback
* Merge full intake profile fields on client GET and PUT responses.

Map missing phi_clients columns, extend operational updates, and return services, contact, health, and demographics fields so the Lead Profile form reads and persists saved values.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add intake_age_years to User entity for profile field mapping.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix Prettier formatting in User entity for CI lint.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Jerry Bony <info@techluminateacademy.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
HIPAA-13A: admin-only /clients/fetchCSV with full phi_clients columns, deny audit logs, and tests. Also always mount /api/payment-methods so Payment Schedule card-on-file works when FEATURE_QUICKBOOKS is false.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…payment-methods-mount

HIPAA-13A CSV admin-only + always mount payment-methods
Gate PUT /clients/:id/birth-outcomes with canAccessSensitive, reject birth-outcome keys on generic client update, and stop exposing free-text birth_outcomes in API responses.

Co-authored-by: Cursor <cursoragent@cursor.com>
Record Cloud Run revision IDs and build metadata after live deploy verification.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…payment-methods-mount

INV-12: Enforce birth-outcomes assignment and retire legacy narrative
Closes INV-09 IDOR on POST /users/:id/addhours by enforcing role, assignment, and IDOR guards with negative authorization tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
…-hours-idor

HIPAA-13E: Restrict service-hours writes to assigned doula or admin
* Minimize public intake emails to client number and CRM link (HIPAA-13F).

Stop sending clinical and identity intake payloads over ordinary staff Gmail;
staff are directed to the authenticated CRM deep-link instead.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix Prettier formatting for HIPAA-13F PR files.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Jerry Bony <info@techluminateacademy.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
)

Co-authored-by: Jerry Bony <info@techluminateacademy.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* Minimize doula assignment emails to client number + CRM link (HIPAA-05).

Remove client name, email, and assignment notes from doula match notifications;
direct doulas to authenticated activities deep-link with privacy tests.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix Prettier formatting on HIPAA-05 docs and preflight context.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Jerry Bony <info@techluminateacademy.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
… email path.

Co-authored-by: Cursor <cursoragent@cursor.com>
…-10).

Unmount the admin simulate-payment endpoint, delete server-side card charge
modules, and add negative tests so only tokenized payment-methods remain.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

@jbony2888 is attempting to deploy a commit to the DISC NU's projects Team on Vercel.

A member of the Team first needs to authorize it.

jbony2888 and others added 2 commits August 25, 2026 19:02
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants