-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPayment.java
More file actions
32 lines (27 loc) · 955 Bytes
/
Copy pathPayment.java
File metadata and controls
32 lines (27 loc) · 955 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
27
28
29
30
31
32
public class Payment {
public int paymentID;
public int orderID;
public String method;
public double amount;
public String status = "pending";
public Payment(int paymentID, int orderID, String method, double amount) {
this.paymentID = paymentID;
this.orderID = orderID;
this.method = method;
this.amount = amount;
}
public int getPaymentID() { return paymentID; }
public int getOrderID() { return orderID; }
public String getMethod() { return method; }
public double getAmount() { return amount; }
public String getStatus() { return status; }
public void setStatus(String status) { this.status = status; }
@Override
public String toString() {
return "PaymentID: " + paymentID +
" | OrderID: " + orderID +
" | Method: " + method +
" | Amount: " + amount +
" | Status: " + status;
}
}