-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common interface that all payment gateway clients will implement
- Loading branch information
1 parent
af0c527
commit ac402aa
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
payment-service/src/main/java/com/finpay/payment_service/gateways/PaymentGateway.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.finpay.payment_service.gateways; | ||
|
||
import com.finpay.payment_service.dtos.PaymentRequest; | ||
import com.finpay.payment_service.dtos.PaymentGatewayResponse; | ||
import com.finpay.payment_service.dtos.RefundRequest; | ||
import com.finpay.payment_service.dtos.RefundGatewayResponse; | ||
|
||
public interface PaymentGateway { | ||
|
||
/** | ||
* Processes a payment through the specific gateway. | ||
* | ||
* @param paymentRequest The payment details. | ||
* @return The response from the payment gateway. | ||
*/ | ||
PaymentGatewayResponse processPayment(PaymentRequest paymentRequest); | ||
|
||
/** | ||
* Processes a refund through the specific gateway. | ||
* | ||
* @param refundRequest The refund details. | ||
* @return The response from the refund gateway. | ||
*/ | ||
RefundGatewayResponse processRefund(RefundRequest refundRequest); | ||
} |