Skip to content

[Feature]: Modular payment-processor plugin system (Grantfox & Stellar) #141

Description

@memplethee-lab

Feature Request

Problem Statement

Currently the codebase mixes payment logic, making it difficult to add new payment processors or maintain multiple backends (Grantfox, Stellar, others). Teams need a modular plugin system so adding or swapping processors is low-effort and reduces risk.

Proposed Solution

Design and implement a Payment Processor Plugin System:

  • Define a clear TypeScript interface (IPaymentProcessor) with methods: initialize, createPayment, signTransaction, submitTransaction, getStatus, refund.
  • Implement adapter plugins for Grantfox and Stellar that adhere to the interface.
  • Provide runtime plugin registration, configuration via env or DB, and a factory to select the processor per request or tenant.
  • Add end-to-end tests ensuring two processors can run side-by-side without interference.

Acceptance criteria:

  • Clear TypeScript interface with documentation and tests for contract compliance.
  • Two adapters implemented: GrantfoxAdapter and StellarAdapter, used by the PaymentsController.
  • Dynamic selection of processor via config or request header works and is covered by tests.
  • README documenting how to add new plugins and configuration examples.

Alternatives Considered

  • Hardcoding payment flows per provider (rejected: poor maintainability).
  • Monolithic payment service with feature flags (less flexible than plugin system).

Additional Context

A plugin system will make this repo more attractive for grant programs and external teams (Grantfox, Stellar) because it lowers onboarding friction and enables rewards for developing adapters.

Implementation Ideas (Optional)

  • Use TypeScript generics for typed request/response shapes per processor.
  • Provide a lightweight registry persisted in DB so operators can enable/disable processors at runtime.

Would you be willing to contribute?

  • Yes, I'd like to submit a PR for this feature
  • I can help with testing
  • I can help with documentation
  • I'd rather let someone else work on this

Activity

  1. removed their assignment
    on Aug 21, 2026
  2. Peculiarr7 commented on Aug 21, 2026

    @Peculiarr7

    Hi! I’m a full-stack developer with a strong blockchain background, and I’m confident I can resolve this issue quickly and effectively. I’ll deliver a clean, reliable solution with immediate attention to detail, ensuring it’s completed as soon as possible. Please assign it to me—I’m ready to get started right away.

  3. Properprogress1 commented on Aug 21, 2026

    @Properprogress1

    Let me work on this please

  4. akargi commented on Aug 21, 2026

    @akargi
    Contributor

    Hi Maintainer,

    I’m a full-stack developer, and I’d like to contribute to the task. I’ll implement it carefully and efficiently thoroughly understand requirements and edge cases
    Communicate promptly about suggestions or improvements. And I will provide regular progress updates and address blockers
    Align with project goals through feedback and clarification.

    Thank you,

  5. grantfox-oss commented on Aug 21, 2026

    @grantfox-oss

    🦊 GrantFox — @akargi has been assigned to this issue as part of the Third Campaign campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #141)
    2. Your PR will be reviewed by the SourceXXL maintainers

    Good luck! Track your progress on GrantFox.

  6. grantfox-oss commented on Aug 21, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox as part of the Third Campaign campaign!

    @akargi's PR #149 was approved and merged by @memplethee-lab.

    🏆 @akargi: You earned 40 FoxPoints for this contribution! Your current tier: Builder (1,065 total points). Track your full progress on GrantFox.

    👏 Great work, @akargi! Keep contributing to SourceXXL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaignenhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions