From 828bc0ccd40a58f4488d3eb8cd10b7e67e7dfaa3 Mon Sep 17 00:00:00 2001 From: Joshua Estes Date: Mon, 11 Dec 2023 14:50:48 -0500 Subject: [PATCH] various updates --- .../Contract/Gateway/PaymentProcessorInterface.php | 5 +++++ src/SonsOfPHP/Contract/Gateway/RequestInterface.php | 12 ++++++++++++ src/SonsOfPHP/Contract/Gateway/ResponseInterface.php | 12 ++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 src/SonsOfPHP/Contract/Gateway/RequestInterface.php create mode 100644 src/SonsOfPHP/Contract/Gateway/ResponseInterface.php diff --git a/src/SonsOfPHP/Contract/Gateway/PaymentProcessorInterface.php b/src/SonsOfPHP/Contract/Gateway/PaymentProcessorInterface.php index 7a79054d..d2fb398f 100644 --- a/src/SonsOfPHP/Contract/Gateway/PaymentProcessorInterface.php +++ b/src/SonsOfPHP/Contract/Gateway/PaymentProcessorInterface.php @@ -25,4 +25,9 @@ interface PaymentProcessorInterface * This MAY BE used as a display on the frontend */ public function getName(): string; + + /** + * Request is sent to the payment processor and a response is returned + */ + public function request(RequestInterface $request): ResponseInterface; } diff --git a/src/SonsOfPHP/Contract/Gateway/RequestInterface.php b/src/SonsOfPHP/Contract/Gateway/RequestInterface.php new file mode 100644 index 00000000..c7a1b9a0 --- /dev/null +++ b/src/SonsOfPHP/Contract/Gateway/RequestInterface.php @@ -0,0 +1,12 @@ + + */ +interface RequestInterface +{ +} diff --git a/src/SonsOfPHP/Contract/Gateway/ResponseInterface.php b/src/SonsOfPHP/Contract/Gateway/ResponseInterface.php new file mode 100644 index 00000000..d67937c4 --- /dev/null +++ b/src/SonsOfPHP/Contract/Gateway/ResponseInterface.php @@ -0,0 +1,12 @@ + + */ +interface ResponseInterface +{ +}