Skip to content

Add local Mollie payment stub for development and testing#46

Open
MannyLama wants to merge 1 commit intomainfrom
claude/mollie-stub-local-testing-011CUoZYMJbbJihckatz9eMg
Open

Add local Mollie payment stub for development and testing#46
MannyLama wants to merge 1 commit intomainfrom
claude/mollie-stub-local-testing-011CUoZYMJbbJihckatz9eMg

Conversation

@MannyLama
Copy link
Contributor

Implements a fully functional local payment provider that simulates
the Mollie payment flow without requiring external API connections.

New components:

  • LocalCheckoutProvider: Implements CheckoutProvider interface with
    in-memory payment storage, automatic status management, and pattern-
    based testing support. Conditionally activated when Mollie Client
    bean is absent.

  • LocalPaymentController: REST API for managing test payments with
    endpoints to list, view, and update payment statuses. Includes an
    interactive HTML checkout page that simulates the Mollie payment flow.

  • Comprehensive documentation in docs/LOCAL_PAYMENT_STUB.md covering
    setup, usage, API endpoints, testing workflows, and troubleshooting.

Configuration changes:

  • Updated application-local.yml to disable Mollie API key by default,
    enabling the local stub for development
  • Added base-url and public-base-url configuration for local environment

Features:

  • Automatic webhook triggering on payment status changes
  • Support for all payment statuses (PAID, CANCELLED, REFUNDED, ONGOING)
  • Pattern-based payment IDs for integration testing
  • In-memory payment storage with full inspection capabilities
  • Simulated checkout page with visual payment flow
  • Zero external dependencies for local development

The stub provides a complete development environment for testing
payment flows across events, activities, and memberships without
needing a Mollie account or test API key.

Implements a fully functional local payment provider that simulates
the Mollie payment flow without requiring external API connections.

New components:
- LocalCheckoutProvider: Implements CheckoutProvider interface with
  in-memory payment storage, automatic status management, and pattern-
  based testing support. Conditionally activated when Mollie Client
  bean is absent.

- LocalPaymentController: REST API for managing test payments with
  endpoints to list, view, and update payment statuses. Includes an
  interactive HTML checkout page that simulates the Mollie payment flow.

- Comprehensive documentation in docs/LOCAL_PAYMENT_STUB.md covering
  setup, usage, API endpoints, testing workflows, and troubleshooting.

Configuration changes:
- Updated application-local.yml to disable Mollie API key by default,
  enabling the local stub for development
- Added base-url and public-base-url configuration for local environment

Features:
- Automatic webhook triggering on payment status changes
- Support for all payment statuses (PAID, CANCELLED, REFUNDED, ONGOING)
- Pattern-based payment IDs for integration testing
- In-memory payment storage with full inspection capabilities
- Simulated checkout page with visual payment flow
- Zero external dependencies for local development

The stub provides a complete development environment for testing
payment flows across events, activities, and memberships without
needing a Mollie account or test API key.
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