Panda Guru LogoPanda
Guru

CRED | SDE2

Round 1

Questions: Design Payment Gateway

Payments are an integral component of any e-commerce or fintech system. With the advent of Digital India, we have seen various types of payment ecosystems emerge, including payment gateways, UPI (Unified Payments Interface), and the RuPay network. These systems are designed for easy integration, allowing organizations to get started in a matter of days.

Due to the wide range of payment players available, organizations often integrate multiple payment gateways and dynamically switch between them to suit their use cases. Based on customer preferences, payments can be made through:

Select a Payment Mode Enter Payment Details:

Payment Gateway Design This section outlines the design of a Payment Gateway (PG) that facilitates payments for its clients. The design should consider the following requirements and assumptions.

Feature Requirements

Assumptions

Code Expectations

Required Functions

  1. showDistribution(): This function should display the current distribution percentage of payment traffic across the integrated banks.
  2. makePayment(): This function should process a payment based on the provided payment details. Different methods (e.g., UPI, cards, net banking) should be handled accordingly.

Expectations

At the end of 1.5 Hr, gave code walkthrough, explained Design Patterns used and also highlighted existing bottlenecks and how we can tackle them.

I was able to write only makePayment() functionality due to time constraint and showDistribution() required actual DB to write SQL queries etc so couldn't start with that. Also, Unit Test cases were expected which I was not able to write in the given time frame. So never heard back from the HR.

Candidate's Approach

The candidate was able to implement the makePayment() functionality but could not complete the showDistribution() function due to time constraints. The candidate noted that implementing showDistribution() would require actual database access to write SQL queries. Additionally, the candidate was unable to write the expected unit test cases within the given timeframe.

Interviewer's Feedback

No feedback provided.