Skip to content

feat: added payment gateway system#42

Merged
prajwal3114 merged 1 commit intoOPCODE-Open-Spring-Fest:mainfrom
adityacosmos24:payment_gateway_system
Oct 30, 2025
Merged

feat: added payment gateway system#42
prajwal3114 merged 1 commit intoOPCODE-Open-Spring-Fest:mainfrom
adityacosmos24:payment_gateway_system

Conversation

@adityacosmos24
Copy link
Copy Markdown
Contributor

@adityacosmos24 adityacosmos24 commented Oct 30, 2025

image

Payment Gateway System

Overview

This pull request introduces the implementation for the Payment Gateway System . The solution demonstrates the application of design principles to enable extensibility and abstraction for integrating multiple payment gateways in a software system.

Key Features

  • Abstract Payment Gateway Interface:
    Defines a standard contract for all payment gateway integrations (e.g., process payment, refund, etc.).
  • Concrete Payment Gateway Implementations:
    Adds support for at least two real or sample gateways (e.g., PayPal, Stripe, Razorpay, etc.), each implementing the abstract interface.
  • Client/Service Layer Integration:
    Demonstrates usage of these gateways in a way such that switching between gateways is easy and requires minimal code changes.
  • Demonstration/Test Classes:
    Includes main/test classes with sample transactions to show correct integration and OCP compliance (Open/Closed Principle).

Design Principles Illustrated

  • Abstraction to generalize payment operations.
  • Open/Closed Principle—new gateways can be added without modifying existing code.
  • Separation of Concerns between payment logic and high-level application logic.

Review & Testing

  • Code compiles and runs as expected
  • Demonstration code shows successful payment flows for multiple gateways
  • Easy to plug in new payment gateways by implementing the interface

Closses #37

@prajwal3114 prajwal3114 merged commit 2237664 into OPCODE-Open-Spring-Fest:main Oct 30, 2025
4 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants