Skip to content

Strengthen payment security, gateway safety, and correctness - #1318

Merged
github-actions[bot] merged 7 commits into
Smartdevs17:mainfrom
Princess-peekay:fix/payment-security-gateway-correctness-1181-1182-1179-1176
Oct 20, 2026
Merged

github-actions[bot] merged 7 commits into
Smartdevs17:mainfrom
Princess-peekay:fix/payment-security-gateway-correctness-1181-1182-1179-1176

Conversation

@Princess-peekay

Copy link
Copy Markdown
Contributor

Summary

One reviewable branch consolidating the four requested AgenticPay payment work items.

Payment security

  • Validate payout merchant IDs and amounts before fraud/velocity accounting.
  • Reject missing, non-finite, zero, negative, and over-limit amounts without poisoning security totals.
  • Add focused middleware tests and document validation expectations.

Gateway integrations

  • Prevent automatic cross-provider retries after ambiguous provider/transport errors, where the original gateway may already have charged the customer.
  • Permit fallback only when an adapter rejects before provider execution because its circuit is open.
  • Add regression tests and document safe fallback semantics.

Payment correctness

  • Preserve existing payload-bound idempotency and returned payment failure accounting while extending regression coverage for duplicate-charge risk.
  • Keep provider response outcomes visible to callers for reconciliation rather than silently replaying a payment.

Verification

  • Added/updated Vitest coverage for payout input validation and gateway fallback behavior.
  • Tests and TypeScript build have not been executed in this workflow; CI must validate the branch before merge.

Related issues

Fixes #1181
Fixes #1182
Fixes #1179
Fixes #1176

@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown

@Princess-peekay is attempting to deploy a commit to the smartdevs17's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 20, 2026

Copy link
Copy Markdown

@Princess-peekay Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@github-actions
github-actions Bot merged commit 4f89320 into Smartdevs17:main Oct 20, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant