feat: implement Stripe PaymentIntent with Zod validation and full test suite#65
Open
lele36844-maker wants to merge 1 commit into
Open
Conversation
…t suite - Replace stub with real stripe.paymentIntents.create() call - Use Zod for input validation (amount: positive int required, currency defaults to usd, optional metadata) - Initialize Stripe client with explicit API version and env-based secret key - Guard against missing STRIPE_SECRET_KEY at client creation time - Support optional metadata field forwarded to Stripe - Rethrow Stripe errors preserving original message - 10 unit tests covering happy path, validation errors, currency normalisation, metadata, error rethrow - Smoke test guarded by STRIPE_SMOKE_TEST=1 env flag Closes SecureBananaLabs#1
Code ReviewPR: feat: implement Stripe PaymentIntent with Zod validation and full test suite by @lele36844-maker
Wallet: Code review for SecureBananaLabs bug-bounty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the stub paymentService.js with a real Stripe SDK integration.
Benchmark Environment
Hardware: local workstation, SSD, 16 GB RAM, Windows 11
Runtime: Node.js 22.x LTS
AI Agent: Claude Code (claude-sonnet-4-6, Anthropic), human-supervised, shell+internet access
Changes
Acceptance Criteria
Closes #1