Skip to content

Reject invalid payment intent amounts#4283

Open
bozicovichsantiago20-oss wants to merge 1 commit into
SecureBananaLabs:mainfrom
bozicovichsantiago20-oss:codex/reject-invalid-payment-amount
Open

Reject invalid payment intent amounts#4283
bozicovichsantiago20-oss wants to merge 1 commit into
SecureBananaLabs:mainfrom
bozicovichsantiago20-oss:codex/reject-invalid-payment-amount

Conversation

@bozicovichsantiago20-oss

Copy link
Copy Markdown

Summary

  • add a payment intent request schema that requires amount to be a finite positive number
  • return 400 Bad Request before creating an intent when amount is missing, non-numeric, zero, or negative
  • add regression coverage for rejected invalid amounts and successful positive amounts

Fixes #4282
/claim #4282

Tests

  • node --test apps/api/src/tests/*.test.js passes (3/3)
  • npm.cmd test --workspace apps/api still fails because the existing script runs node --test src/tests, which Node treats as a missing module directory in this checkout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Payment intent should reject non-positive amounts

1 participant