Add all 23 GoF design pattern implementations (2026-06-13)
This commit is contained in:
12
02-structural/adapter/PaymentGateway.java
Normal file
12
02-structural/adapter/PaymentGateway.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package adapter;
|
||||
|
||||
/**
|
||||
* The Target interface — what YOUR application's code expects.
|
||||
* Every payment gateway in your system must implement this.
|
||||
* Written to handle modern async-style payment flows.
|
||||
*/
|
||||
public interface PaymentGateway {
|
||||
boolean charge(String customerId, double amount, String currency);
|
||||
boolean refund(String transactionId, double amount);
|
||||
String getStatus(String transactionId);
|
||||
}
|
||||
Reference in New Issue
Block a user