Skip to content

feat: add PaymentController v2 architecture#1

Open
foppe-nvv wants to merge 1 commit into
developfrom
refactor/payment-controller-architecture
Open

feat: add PaymentController v2 architecture#1
foppe-nvv wants to merge 1 commit into
developfrom
refactor/payment-controller-architecture

Conversation

@foppe-nvv
Copy link
Copy Markdown
Collaborator

@foppe-nvv foppe-nvv commented Jan 14, 2026

Internal tracking PR. Upstream: frappe#192

Branches

Branch Scope
refactor/payment-controller-architecture PaymentController base architecture
feat/stripe-payment-intent + Stripe PaymentIntent migration
feat/stripe-e2e-and-ci + CI/tooling + E2E tests

@foppe-nvv foppe-nvv marked this pull request as draft January 14, 2026 12:12
@0spinboson 0spinboson force-pushed the refactor/payment-controller-architecture branch 3 times, most recently from e8e80ae to 9453739 Compare January 15, 2026 10:28
@0spinboson
Copy link
Copy Markdown
Collaborator

0spinboson commented Jan 15, 2026

cleaned up and reordered the code additions and changes into thematic commits now that everything seems to be working

@0spinboson 0spinboson force-pushed the refactor/payment-controller-architecture branch 6 times, most recently from f82df10 to 6263703 Compare January 20, 2026 23:03
@0spinboson 0spinboson marked this pull request as ready for review January 20, 2026 23:25
@0spinboson 0spinboson force-pushed the refactor/payment-controller-architecture branch from 6263703 to 9d33c09 Compare February 20, 2026 20:59
@0spinboson 0spinboson changed the title Refactor/payment controller architecture feat: PaymentController v2 architecture with Stripe PaymentIntent implementation Feb 20, 2026
@nlvegan nlvegan deleted a comment from chatgpt-codex-connector Bot Feb 27, 2026
@0spinboson 0spinboson force-pushed the refactor/payment-controller-architecture branch from 9d33c09 to 15a8dfc Compare February 27, 2026 09:06
@0spinboson 0spinboson changed the title feat: PaymentController v2 architecture with Stripe PaymentIntent implementation feat: add PaymentController v2 architecture Feb 27, 2026
@0spinboson 0spinboson closed this Feb 27, 2026
@0spinboson 0spinboson reopened this Feb 27, 2026
Add a template-method based PaymentController that orchestrates the
full payment lifecycle: initiate -> proceed -> process_response.

- PaymentController base class with abstract gateway contracts
- Payment Session Log DocType for tracking payment state
- Payment Button DocType for gateway selection UI
- /pay universal payment endpoint with multi-gateway support
- Type system (TxData, Proceeded, Processed, SessionStates)
- Custom exception hierarchy for structured error handling
- TX data filtering whitelist to prevent parameter tampering
- Concurrency guards with document locking and terminal state checks
- is_v2_gateway() utility for detecting v2-compatible gateways
- Fix delete_custom_fields to use composite key lookup
- Fix get_checkout_url to route through get_payment_gateway_controller
- Add Payment Session Log link field on Payment Request
- Integration tests for controller lifecycle
@0spinboson 0spinboson force-pushed the refactor/payment-controller-architecture branch from 15a8dfc to cdf1bbc Compare February 27, 2026 09:25
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.

2 participants