forked from ashishps1/awesome-low-level-design
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreditCard.cs
More file actions
26 lines (23 loc) · 696 Bytes
/
CreditCard.cs
File metadata and controls
26 lines (23 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using System.Numerics;
namespace DigitalWallet
{
public class CreditCard : PaymentMethod
{
private readonly string cardNumber;
private readonly string expirationDate;
private readonly string cvv;
public CreditCard(string id, User user, string cardNumber, string expirationDate, string cvv)
: base(id, user)
{
this.cardNumber = cardNumber;
this.expirationDate = expirationDate;
this.cvv = cvv;
}
public override bool ProcessPayment(decimal amount, Currency currency)
{
// Process credit card payment logic
return true;
}
}
}