From fa481abb083a82b7626dbd4ede09cc9d77b39602 Mon Sep 17 00:00:00 2001 From: Daniel Subiabre Date: Tue, 1 Oct 2024 12:13:15 +0200 Subject: [PATCH] Rename gateway main method to process --- src/Library/Economy/Payment/GatewayInterface.php | 2 +- src/Library/Economy/Payment/StripeGateway.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Library/Economy/Payment/GatewayInterface.php b/src/Library/Economy/Payment/GatewayInterface.php index 7575e5c..c9cb0bc 100644 --- a/src/Library/Economy/Payment/GatewayInterface.php +++ b/src/Library/Economy/Payment/GatewayInterface.php @@ -35,7 +35,7 @@ interface GatewayInterface * * @return GatewayCheckout The GatewayCheckout updated with the data given by the gateway */ - public function sendData(GatewayCheckout $checkout): GatewayCheckout; + public function process(GatewayCheckout $checkout): GatewayCheckout; /** * When a user is redirected by the gateway we must handle the redirection diff --git a/src/Library/Economy/Payment/StripeGateway.php b/src/Library/Economy/Payment/StripeGateway.php index 8c2e0e0..31150bf 100644 --- a/src/Library/Economy/Payment/StripeGateway.php +++ b/src/Library/Economy/Payment/StripeGateway.php @@ -42,7 +42,7 @@ class StripeGateway implements GatewayInterface return 'stripe'; } - public function sendData(GatewayCheckout $checkout): GatewayCheckout + public function process(GatewayCheckout $checkout): GatewayCheckout { $session = $this->stripe->checkout->sessions->create([ 'customer_email' => $checkout->getOrigin()->getUser()->getEmail(),