Skip to content

Implement Stripe payment intents#732

Open
s0584273828-ctrl wants to merge 1 commit into
SecureBananaLabs:mainfrom
s0584273828-ctrl:bounty-1-stripe-payment-intent
Open

Implement Stripe payment intents#732
s0584273828-ctrl wants to merge 1 commit into
SecureBananaLabs:mainfrom
s0584273828-ctrl:bounty-1-stripe-payment-intent

Conversation

@s0584273828-ctrl
Copy link
Copy Markdown

/claim #1

Summary

  • Replace the timestamp pay_${Date.now()} stub with Stripe PaymentIntent creation via the official stripe SDK and STRIPE_SECRET_KEY.
  • Validate positive-integer amount, default and validate currency, normalize metadata, and map Stripe id / client_secret to paymentId / clientSecret.
  • Preserve Stripe provider error messages through API error handling and add mocked service tests plus an opt-in live smoke test.

Validation

  • npm test -w apps/api -> 5 passed, 1 guarded Stripe smoke skipped without STRIPE_SECRET_KEY
  • node --check apps/api/src/services/paymentService.js
  • node --check apps/api/src/tests/paymentService.test.js
  • git diff --check

Note: the live Stripe smoke path is committed but was not executed here because no Stripe test secret is available in this environment.

Prepared with AI assistance and manually reviewed before submission.

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.

1 participant