Skip to content

feat: implement Stripe payment gateway with validation and error handling#11348

Open
pistakugli wants to merge 1 commit into
SecureBananaLabs:mainfrom
pistakugli:fix/stripe-payment-gateway
Open

feat: implement Stripe payment gateway with validation and error handling#11348
pistakugli wants to merge 1 commit into
SecureBananaLabs:mainfrom
pistakugli:fix/stripe-payment-gateway

Conversation

@pistakugli

Copy link
Copy Markdown

Changes

  • Replace stub with real Stripe PaymentIntent creation
  • Validate amount (required, positive integer)
  • Default currency to 'usd'
  • Handle Stripe errors with preserved messages
  • Add unit tests for all acceptance criteria

Acceptance Criteria

  • stripe npm package installed, STRIPE_SECRET_KEY env var used
  • payload.amount validated as positive integer
  • payload.currency defaults to 'usd'
  • Real stripe.paymentIntents.create() call made
  • Returns clientSecret and paymentId
  • Stub pay_${Date.now()} removed
  • Stripe errors caught and re-thrown
  • Unit tests added

Wallet

0xb7419c92b1d93251c0c85b756b390b29ab8162e0 (Polygon)

Fixes #1

…ling

- Replace stub with real Stripe PaymentIntent creation
- Validate amount (required, positive integer)
- Default currency to 'usd'
- Handle Stripe errors with preserved messages
- Add unit tests for all acceptance criteria

Fixes SecureBananaLabs#1
github-actions Bot added a commit that referenced this pull request Jul 21, 2026
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.

Implement Secure Payment Gateway and Payment Service

1 participant