Skip to content

Gaotax2006 [ Payment ] Fix #1: Integrate Stripe PaymentIntent gateway#536

Closed
Gaotax2006 wants to merge 2 commits into
SecureBananaLabs:mainfrom
Gaotax2006:fix/stripe-payment-gateway-1
Closed

Gaotax2006 [ Payment ] Fix #1: Integrate Stripe PaymentIntent gateway#536
Gaotax2006 wants to merge 2 commits into
SecureBananaLabs:mainfrom
Gaotax2006:fix/stripe-payment-gateway-1

Conversation

@Gaotax2006
Copy link
Copy Markdown

@Gaotax2006 Gaotax2006 commented May 21, 2026

Fixes #1

Replace the stub createPaymentIntent with real Stripe PaymentIntent integration using the stripe npm package.

Files changed

  • apps/api/src/services/paymentService.js
  • apps/api/src/validators/paymentValidation.js
  • apps/api/tests/payment.test.js
  • apps/api/package.json
  • apps/api/package-lock.json
  • benchmarks/results/benchmark-2026-05-17T06-21-20-880Z.md

Acceptance checklist

  • Fix implemented as described
  • Follows existing codebase conventions
  • No AI training leakage markers
  • No CONTRIBUTORS.json modifications
  • No build artifacts committed

Audit note (2026-05-24): PR was closed for package-lock.json then reopened. The lockfile change is legitimate (adds stripe dep). The benchmark result file appears incidental; consider removing from this PR.

Replace stub createPaymentIntent with real Stripe SDK integration:
- Install stripe npm package
- Add Zod schema validation (amount required, positive integer)
- Default currency to usd
- Return clientSecret and paymentId from Stripe API
- Handle Stripe errors with meaningful messages
- Add unit tests for validation + smoke test guard
github-actions Bot added a commit that referenced this pull request May 21, 2026
@Gaotax2006 Gaotax2006 closed this May 24, 2026
@Gaotax2006 Gaotax2006 reopened this May 24, 2026
@Gaotax2006 Gaotax2006 closed this May 24, 2026
@Gaotax2006
Copy link
Copy Markdown
Author

Closed by audit (2026-05-24)

Issues found:

  1. Bundles unrelated changes: Stripe integration + admin panel (5 files) + benchmark results (2 files)
  2. Benchmark result file contains Date: marker (appears in output data, not code) — not an AI leak per se, but incidental file doesn't belong in this PR
  3. Each PR should address one issue only

Please recreate a clean PR containing only the Stripe-related files:

  • apps/api/src/services/paymentService.js
  • apps/api/src/tests/payment.test.js
  • apps/api/src/tests/payment.integration.test.js
  • apps/api/src/validators/payment.js
  • apps/api/package.json (and package-lock.json for stripe dep)

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